instance method
rollback_active_record_state!
Ruby on Rails 3.2.22.5
Since v2.2.3 Last seen in v4.1.16Signature
rollback_active_record_state!()
Reset id and @new_record if the transaction rolls back.
Source
# File activerecord/lib/active_record/transactions.rb, line 268
def rollback_active_record_state!
remember_transaction_record_state
yield
rescue Exception
IdentityMap.remove(self) if IdentityMap.enabled?
restore_transaction_record_state
raise
ensure
clear_transaction_record_state
end
Defined in activerecord/lib/active_record/transactions.rb line 268
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Transactions