ActiveRecord after_write_to_database or after_any_commit? #6658

fingermark opened this Issue Jun 7, 2012 · 1 comment


None yet
2 participants

After learning that after_commit does not fire after any COMMIT, but only on those instances inside the transaction which "save", can someone add a callback that will fire on any write to the database? Or create an after_any_commit that will fire on any COMMIT, even if it is empty, such as

MyModel.transaction do


With after_any_commit I could then wrap update_all in a transaction and have it fire a callback.


rafaelfranca commented Jun 7, 2012

The Rails issues tracker is not a place to discuss feature requests. If you want to discuss this send an email to the Rails Core mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment