Module: DataMapper::Model::Transaction

Included in:
DataMapper::Model
Defined in:
lib/gems/dm-core-0.9.9/lib/dm-core/model.rb

Overview

TODO: move to dm-more/dm-transactions

Instance Method Summary collapse

Instance Method Details

#transactionDataMapper::Adapters::Transaction a new DataMapper::Adapters::Transaction with all DataMapper::Repositories of the class of this DataMapper::Resource added.

Produce a new Transaction for this Resource class

- TODO: move to dm-more/dm-transactions

Returns:

  • (DataMapper::Adapters::Transaction a new DataMapper::Adapters::Transaction with all DataMapper::Repositories of the class of this DataMapper::Resource added.)

    DataMapper::Adapters::Transaction a new DataMapper::Adapters::Transaction with all DataMapper::Repositories of the class of this DataMapper::Resource added.



497
498
499
# File 'lib/gems/dm-core-0.9.9/lib/dm-core/model.rb', line 497

def transaction
  DataMapper::Transaction.new(self) { |block_args| yield(*block_args) }
end