pat / after_commit

A Ruby on Rails plugin to add an after_commit callback. This can be used to trigger things only after the entire transaction is complete.
MIT License
62 stars 32 forks source link

Rollback transactions in after_commit blocks #13

Closed ivantsepp closed 8 years ago

ivantsepp commented 8 years ago

If there is an exception in a transaction that occurs in after_commit block, we need to call ROLLBACK otherwise the connection will be unusable

pat commented 8 years ago

Cherry-picked the code change into my master branch (didn't want the version number alteration). A little surprised this gem is still being used though, given the functionality has been in Rails for quite some time! Which version of Rails are you using?

ivantsepp commented 8 years ago

Oh wow, thanks for merging! :smile: Yea, we're still on Rails 2 though we are in the middle of upgrading.

pat commented 8 years ago

Good luck with the upgrade :)