method
current_transaction
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::Transactions::ClassMethods
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.