Module | ActiveRecord::Transactions |
In: |
lib/active_record/transactions.rb
|
See ActiveRecord::Transactions::ClassMethods for documentation.
Add the record to the current transaction so that the :after_rollback and :after_commit callbacks can be called.
Executes method within a transaction and captures its return value as a status flag. If the status is true the transaction is committed, otherwise a ROLLBACK is issued. In any case the status flag is returned.
This method is available within the context of an ActiveRecord::Base instance.
Save the new record state and id of a record so it can be restored later if a transaction fails.
Restore the new record state and id of a record that was previously saved by a call to save_record_state.
Determine if a transaction included an action for :create, :update, or :destroy. Used in filtering callbacks.
Determine if a record was created or destroyed in a transaction. State should be one of :new_record or :destroyed.