404
message people normally see, Rails gives you an unsightly routing error, with a "no route to match" message:In order to change that and assign a controller to any unhandled URLs, append the following line as the last statement of your
config/routes.rb
:map.connect '*anything', :controller => 'controller', :action => 'action'Replace
controller
and action
with the desired controller and action respectively. This will allow all unhandled URLs to be managed by the controller of your choosing.
1 comments:
Thanks for sharing. it helps!!!
Post a Comment