instance method
add_to_transaction
Ruby on Rails edge
Since v3.0.20 Private — implementation detail, not part of the public APISignature
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_finalizeopt = 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