Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

inject down the hash cache

  • Loading branch information...
commit 2de0ccafdd0dbb11070bb8ffd43e76adb7c197f0 1 parent 1a193bd
@tenderlove tenderlove authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 activerecord/lib/active_record/associations/join_dependency.rb
View
5 activerecord/lib/active_record/associations/join_dependency.rb
@@ -123,9 +123,8 @@ def cache_joined_association(association)
associations.unshift(parent.reflection.name)
parent = parent.parent
end
- ref = @associations
- associations.each do |key|
- ref = ref[key]
+ ref = associations.inject(@associations) do |cache,key|
+ cache[key]
end
ref[association.reflection.name] ||= {}
end
Please sign in to comment.
Something went wrong with that request. Please try again.