how do you set a default route in routes.rb
so that anything not recognised will default to :controller => ‘home’
map.connect ‘*’, :controller => “home”
does not work so well
cheers
how do you set a default route in routes.rb
so that anything not recognised will default to :controller => ‘home’
map.connect ‘*’, :controller => “home”
does not work so well
cheers
found answer
replace
map.connect ‘:controller/:action/:id’,
with
%w{articles pages xml other controller names}.each do |c|
map.connect “#{c}/:action/:id”, :controller => c
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs