method

begin_transaction

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: TransactionManager
begin_transaction(options = {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 151
      def begin_transaction(options = {})
        @connection.lock.synchronize do
          run_commit_callbacks = !current_transaction.joinable?
          transaction =
            if @stack.empty?
              RealTransaction.new(@connection, options, run_commit_callbacks: run_commit_callbacks)
            else
              SavepointTransaction.new(@connection, "active_record_#{@stack.size}", options,
                                       run_commit_callbacks: run_commit_callbacks)
            end

          @stack.push(transaction)
          transaction
        end
      end
Register or log in to add new notes.