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.
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 298
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