Forum: Ruby on Rails rescue_action_in_public in development environment?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
dave davidson (Guest)
on 2006-02-16 16:46
(Received via mailing list)
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?
This topic is locked and can not be replied to.