This same question was asked yesterday, search archives. The basic idea
is to
use rescue_action method.
Kent.
Got it. Thanks.
However, the solution there won’t work for me, as I’d like to catch them
within the actual actions, as opposed to in a general method per
controller.
Could you explain to me why those constants (ie, the AC exception
classes) aren’t defined - shouldn’t they have been defined when
action_controller.rb was included? - and how I can define them?
I’m assuming that, if I were to define them, I could then catch them
within my action methods. Is this true?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.