Catching routing errors

Hello, I wonder how to avoid routing error message by displaying (when
in production mode) a customized error page ?

In fact, how do I catch a routing error ?

Thank you

write unit tests to verify the routing config. I always add a catch-all
which takes the user to the home page in case of routing error.

Neeraj K. wrote:

write unit tests to verify the routing config. I always add a catch-all
which takes the user to the home page in case of routing error.

Ok, that what that simple ! Thank you…

My catch all is at the end of the route.rb file

map.connect ‘*path’ , :controller => ‘welcome’ , :action => ‘bad_route’

catch all !

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs