after_commit_action

Use this module to defer actions to the after-commit hook. This is useful if you want to trigger actions in after_create, after_destroy and after_update callbacks but want to execute them outside of the transaction (for example, to avoid deadlocks).

Usage

include AfterCommitAction
after_create :my_hook
def my_hook
  execute_after_commit { puts "This is called after committing the transaction. "}
end

Contributing to after_commit_action

Copyright © 2012 BestVendor. See LICENSE.txt for further details.