module

DB::BeginTransaction

Instance methods

begin_transaction

Creates a transaction from the current context. If is expected that either Transaction#commit or Transaction#rollback are called explicitly to release the context.

Source
transaction

yields a transaction from the current context. Query the database through Transaction#connection object. If an exception is thrown within the block a rollback is performed. The exception thrown is bubbled unless it is a DB::Rollback. From the yielded object Transaction#commit or Transaction#rollback can be called explicitly. Returns the value of the block.

Source