27 May, 2008

Handling Routing and Dispatch Errors in Rails

I've been trying to show nice error pages for RoutingErrors and MethodNotAllowed errors, which are raised outside of the context of a Controller. I dug into the routing and dispatch code and finally realized that those errors cause a direct call to :rescue_action, bypassing :rescue_action_with_handler.

I've put the result at http://pastie.caboo.se/204355.

1 comment:

pay per head bookie said...

Hi, nice post. I have been wondering about this topic,so thanks for sharing. I will certainly be subscribing to your blog.