rollback_active_record_state!()
public
Reset id and @new_record if the transaction rolls
back.
# File activerecord/lib/active_record/transactions.rb, line 250
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