method

current_transaction

rails latest stable - Class: ActiveRecord::Transactions::ClassMethods

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

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.