Module: DataMapper::Transaction::Resource

Defined in:
lib/dm-core/transaction.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.



487
488
489
# File 'lib/dm-core/transaction.rb', line 487

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