Method: DataMapper::Transaction::DataObjectsAdapter#push_transaction

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

#push_transaction(transaction) ⇒ Array(Transaction)

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.

Pushes the given Transaction onto the per thread Transaction stack so that everything done by this Adapter is done within the context of said Transaction.

Parameters:

  • transaction (Transaction)

    a Transaction to be the ‘current’ transaction until popped.

Returns:

  • (Array(Transaction))

    the stack of active transactions for the current thread



35
36
37
# File 'lib/dm-transactions/adapters/dm-do-adapter.rb', line 35

def push_transaction(transaction)
  transactions << transaction
end