Module: WhenCommitted::ActiveRecord
- Defined in:
- lib/when_committed.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 |
# File 'lib/when_committed.rb', line 5 def self.included(base) base.after_commit :run_when_committed_callbacks base.after_rollback :clear_when_committed_callbacks end |
Instance Method Details
#when_committed(&block) ⇒ Object
10 11 12 |
# File 'lib/when_committed.rb', line 10 def when_committed(&block) when_committed_callbacks << block end |