Method: ActiveRecord::Transactions#committed!
- Defined in:
- 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.
317 318 319 320 321 322 323 324 325 |
# File 'lib/active_record/transactions.rb', line 317 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 |