Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This seems a good idea, but why scaffold does not go this way? Also I assume you recommend to use rescue_action if there are several such methods? Commented Oct 27, 2010 at 15:27
  • Ok, I am going to assume you meant a rescue_from or rescue_action_in_public handler for multiple methods, in which case Chubas reply here is a subset of this one and I should accept this one as an answer. Commented Oct 27, 2010 at 18:33
  • As a general rule I use rescue_from for things that cannot be easily recovered from, and rescue when I can handle it. When a create fails, typically you just render the new form again. Something more abstract generally returns a pretty "Uh oh" page. Commented Oct 27, 2010 at 21:47