Method: DataMapper::Transaction::DataObjectsAdapter#current_transaction

Defined in:
lib/dm-transactions/adapters/dm-do-adapter.rb

#current_transactionTransaction

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Retrieve the current transaction for this Adapter.

Everything done by this Adapter is done within the context of this Transaction.

Returns:

  • (Transaction)

    the ‘current’ transaction for this Adapter.



60
61
62
# File 'lib/dm-transactions/adapters/dm-do-adapter.rb', line 60

def current_transaction
  transactions.last
end