instance method add_to_transaction

Ruby on Rails edge

Since v3.0.20 Private — implementation detail, not part of the public API

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 edge

Signature

add_to_transaction(ensure_finalize = true)

Add the record to the current transaction so that the #after_rollback and #after_commit callbacks can be called.

Parameters

ensure_finalize opt = true
Source
# File activerecord/lib/active_record/transactions.rb, line 560
      def add_to_transaction(ensure_finalize = true)
        self.class.with_connection do |connection|
          connection.add_transaction_record(self, ensure_finalize)
        end
      end

Defined in activerecord/lib/active_record/transactions.rb line 560 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Transactions

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close