Module: DataMapper::Resource::Transaction

Included in:
DataMapper::Resource
Defined in:
lib/dm-core/resource.rb

Overview

TODO: move to dm-more/dm-transactions

Instance Method Summary collapse

Instance Method Details

#transaction(&block) ⇒ Object

Produce a new Transaction for the class of this Resource

Returns

<DataMapper::Adapters::Transaction>

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

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



630
631
632
# File 'lib/dm-core/resource.rb', line 630

def transaction(&block)
  model.transaction(&block)
end