method

before_commit

rails latest stable - Class: ActiveRecord::ConnectionAdapters::Transaction

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

before_commit(&block)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 195
      def before_commit(&block)
        if @state.finalized?
          raise ActiveRecordError, "Cannot register callbacks on a finalized transaction"
        end

        (@callbacks ||= []) << Callback.new(:before_commit, block)
      end