Method: ActiveRecord::Transactions#committed!
- Defined in:
- activerecord/lib/active_record/transactions.rb
#committed!(should_run_callbacks: true) ⇒ Object
Call the #after_commit callbacks.
Ensure that it is not called if the object was never persisted (failed create), but call it after the commit of a destroyed object.
380 381 382 383 384 385 386 387 388 |
# File 'activerecord/lib/active_record/transactions.rb', line 380 def committed!(should_run_callbacks: true) # :nodoc: @_start_transaction_state = nil if should_run_callbacks @_committed_already_called = true _run_commit_callbacks end ensure @_committed_already_called = @_trigger_update_callback = @_trigger_destroy_callback = false end |