Module ActiveRecord::Transactions
In: lib/active_record/transactions.rb

Methods

Classes and Modules

Module ActiveRecord::Transactions::ClassMethods

Public Instance methods

Add the record to the current transaction so that the :after_rollback and :after_commit callbacks can be called.

Reset id and @new_record if the transaction rolls back.

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.

Protected Instance methods

Clear the new record state and id of a record.

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.

[Validate]