Module: ArTransactionChanges
- Defined in:
- lib/ar_transaction_changes.rb,
lib/ar_transaction_changes/version.rb
Constant Summary collapse
- VERSION =
"1.0.0"
Instance Method Summary collapse
Instance Method Details
#run_callbacks(kind, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ar_transaction_changes.rb', line 4 def run_callbacks(kind, &block) ret = super case kind.to_sym when :create, :update store_transaction_changed_attributes if ret != false when :commit, :rollback @transaction_changed_attributes = nil end ret end |
#transaction_changed_attributes ⇒ Object
16 17 18 |
# File 'lib/ar_transaction_changes.rb', line 16 def transaction_changed_attributes changed_attributes.merge(@transaction_changed_attributes || {}) end |