Timeline for Rails Newbie: Recommendations for error handling in controller
Current License: CC BY-SA 2.5
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 27, 2010 at 21:47 | comment | added | tadman | 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. | |
| Oct 27, 2010 at 18:33 | vote | accept | Andrey Shchekin | ||
| Oct 27, 2010 at 18:33 | comment | added | Andrey Shchekin | 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. | |
| Oct 27, 2010 at 15:27 | comment | added | Andrey Shchekin | 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? | |
| Oct 27, 2010 at 15:22 | history | answered | tadman | CC BY-SA 2.5 |