dave davidson
2006-Feb-16 14:46 UTC
[Rails] rescue_action_in_public in development environment?
hi, i''m trying to implement rescue_action_in_public as a catch-all to redirect to an error page when an exception is thrown (actually, just for testing, I''m rendering "ERROR"). However, putting def render_action_in_public render( :text=>"ERROR" ) end in either a specific controller or even application.rb, has no effect on the app redirecting on an exception. For instance, if I put a bogus controller name in the URL it still gives a "Routing Error" message instead of the rendered "ERROR." Similarly, specifying a non-existant action in a URL gives an "Unknown Action" error. I''m guessing this a result of being in development environment (which I am). I know you can specify an IP as a developer machine in production mode via ''local_request?'', but how about the other way around?
Apparently Analagous Threads
- writing tests for rescue_action_in_public
- rescue_action_in_public question
- rendering error page for "Unauthorized" from before_filter
- Custom rescue_action_* methods not being called?
- How do I call the exception_notifier from my own rescue_action_in_public ?
