Skip to content
Browse files

Remove associated object from identity map when reloading.

  • Loading branch information...
1 parent 234bbe5 commit 6f684478dde8f55f20211f7a4ec0680a44c03225 @miloops miloops committed
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/lib/active_record/associations/association_proxy.rb
View
1 activerecord/lib/active_record/associations/association_proxy.rb
@@ -110,6 +110,7 @@ def conditions
# 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

0 comments on commit 6f68447

Please sign in to comment.
Something went wrong with that request. Please try again.