Rescue_action_in_public in development environment?


#1

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?