Module: DataMapper::Transaction::Resource

Defined in:
lib/dm-transactions.rb

Overview

module Model

Instance Method Summary collapse

Instance Method Details

#transactionAdapters::Transaction

Produce a new Transaction for the class of this Resource

Returns:

  • (Adapters::Transaction)

    a new Adapters::Transaction for the Repository of the class of this Resource added.



386
387
388
# File 'lib/dm-transactions.rb', line 386

def transaction
  model.transaction { |*block_args| yield(*block_args) }
end