diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-15 16:30:09 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:08:09 -0300 |
commit | 6f684478dde8f55f20211f7a4ec0680a44c03225 (patch) | |
tree | 68de904744f4854bcdf81ea6f5c8ca2f6e0f7293 | |
parent | 234bbe5cb0e31b786cc73e8f63e55a9ce8aecf88 (diff) | |
download | rails-6f684478dde8f55f20211f7a4ec0680a44c03225.tar.gz rails-6f684478dde8f55f20211f7a4ec0680a44c03225.tar.bz2 rails-6f684478dde8f55f20211f7a4ec0680a44c03225.zip |
Remove associated object from identity map when reloading.
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index bfedffcf02..2024cee968 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -110,6 +110,7 @@ module ActiveRecord # Resets the \loaded flag to +false+ and sets the \target to +nil+. def reset @loaded = false + IdentityMap.remove(@target) if defined?(@target) && @target && IdentityMap.enabled? @target = nil end |