1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove object from identity map if transaction failed.

This commit is contained in:
Emilio Tagua 2010-09-13 14:54:57 -03:00
parent eebf33a234
commit e88fd0230f

View file

@ -247,6 +247,7 @@ module ActiveRecord
remember_transaction_record_state
yield
rescue Exception
IdentityMap.remove(self) if IdentityMap.enabled?
restore_transaction_record_state
raise
ensure