Module: AfterCommitAction
- Defined in:
- lib/after_commit_action.rb
Overview
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: after_create :my_hook def my_hook
execute_after_commit { puts "This is called after committing the transaction. "}
end
Defined Under Namespace
Modules: ActiveRecord