method

current_transaction

current_transaction()
public

Returns a representation of the current transaction state, which can be a top level transaction, a savepoint, or the absence of a transaction.

An object is always returned, whether or not a transaction is currently active. To check if a transaction was opened, use current_transaction.open?.

See the ActiveRecord::Transaction documentation for detailed behavior.