instance method
rollback_transaction_records
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v3.2.22.5Signature
rollback_transaction_records(rollback)
Send a rollback message to all records after they have been rolled back. If rollback is false, only rollback records since the last save point.
Parameters
-
rollbackreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 373
def rollback_transaction_records(rollback) #:nodoc
if rollback
records = @_current_transaction_records.flatten
@_current_transaction_records.clear
else
records = @_current_transaction_records.pop
end
unless records.blank?
records.uniq.each do |record|
begin
record.rolledback!(rollback)
rescue Exception => e
record.logger.error(e) if record.respond_to?(:logger) && record.logger
end
end
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 373
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements