This project is archived and is in readonly mode.

#205 ✓invalid
David Yeu

Rescue handlers should only run for non-local requests

Reported by David Yeu | May 15th, 2008 @ 10:57 PM

The new rescue_from declarative handlers run in every mode. Since they're usually pimped as a replacement for rescue_action_in_public, I think they should act accordingly (at least for now) and run only for non-local requests. The offending code in action_controller/rescue.rb:

def perform_action_with_rescue #:nodoc:
rescue Exception => exception
  rescue_action_with_handler(exception) || 

A patch is attached to implement this behavior change.

Comments and changes to this ticket

  • Pratik

    Pratik May 16th, 2008 @ 12:44 PM

    • State changed from “new” to “invalid”

    It's very common to use rescue_from along with AR#save! method to render 'edit' or 'new' on validation failures, irrespective of dev/prod mode. And many similar use cases.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket