I want to render a 404 whenever ActionController::RoutingError is
thrown in my application. This works in my apps running the 1.1.6 gem,
but not when running on edge rails or 1.2-RC1. I suspect it has
something to do with this (from the RoR blog):
“Uncaught exceptions raised anywhere in your application will cause
RAILS_ROOT/public/500.html to be read and shown instead of just the
static “Application error (Rails).” So make it look nice if you
aren’t using it already!”
(Ruby on Rails — Rails 1.2 RC1: New in Action Pack)
Anybody have any ideas how to override this for Routing Errors?
My bad, apparently rescue_action_in_public doesn’t catch
ActionController::RoutingError. It does catch UnknownAction and
RecordNotFound…this is interesting and I hope I can figure out how to
fix it.
My bad, apparently rescue_action_in_public doesn’t catch
ActionController::RoutingError. It does catch UnknownAction and
RecordNotFound…this is interesting and I hope I can figure out how to
fix it.
Yeah, that’s what I’ve been trying to figure out…
Any insight into this would be awesome.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.