diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-13 14:54:57 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:04:40 -0300 |
commit | e88fd0230fd62ef0754c912e194ea0043ced310b (patch) | |
tree | b9a166ca8009385dd98462b93dea766f2f2e1a97 /activerecord/lib/active_record | |
parent | eebf33a2347bd4717b6ce966c2b7def4d573ec51 (diff) | |
download | rails-e88fd0230fd62ef0754c912e194ea0043ced310b.tar.gz rails-e88fd0230fd62ef0754c912e194ea0043ced310b.tar.bz2 rails-e88fd0230fd62ef0754c912e194ea0043ced310b.zip |
Remove object from identity map if transaction failed.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/transactions.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 8c94d1a2bc..31e60e123d 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -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 |