Method: DataMapper::Transaction::Model#transaction
- Defined in:
- lib/dm-transactions.rb
#transaction ⇒ Adapters::Transaction a new Adapters::Transaction with all Repositories of the class of this Resource added.
Produce a new Transaction for this Resource class
371 372 373 374 |
# File 'lib/dm-transactions.rb', line 371 def transaction transaction = Transaction.new(self) transaction.commit { |block_args| yield(*block_args) } end |