News for hackers. Stuff that matters.
Re:Ruby Frameworks? Which one? Bye bye Rails. by jshen on Tuesday January 31, 2012 @11:07AM (#3533824)
"The after_commit and after_rollback callbacks are guaranteed to be called for all models created, updated, or destroyed within a transaction block. If any exceptions are raised within one of these callbacks, they will be ignored so that they don’t interfere with the other callbacks. As such, if your callback code could raise an exception, you’ll need to rescue it and handle it appropriately within the callback."

http://guides.rubyonrails.org/active_record_validations_call...

Re:Ruby Frameworks? Which one? Bye bye Rails. by rohitarondekar on Tuesday January 31, 2012 @08:23PM (#3536169)
"The whole callback chain is wrapped in a transaction. If any before callback method returns exactly false or raises an exception, the execution chain gets halted and a ROLLBACK is issued; after callbacks can only accomplish that by raising an exception."

― http://guides.rubyonrails.org/active_record_validations_call...

Re:Ruby Frameworks? Which one? Bye bye Rails. by jshen on Tuesday January 31, 2012 @10:06PM (#3536457)
I'm not sure what your point is. He was talking about after_commit callbacks. Your quote is about the callbacks during a transaction, not after it.
Re:Ruby Frameworks? Which one? Bye bye Rails. by subwindow on Tuesday January 31, 2012 @01:48PM (#3534597)
Huh. Thanks. I looked for a long time and didn't see that. The closest I got was an extremely old lighthouse ticket where Aaron Patterson suggested that they change the behavior to raise errors, but there was no followup.