Permalink
Browse files

keys are always symbols

  • Loading branch information...
1 parent 2a2707f commit d0be8a04804fc6e7aa9fa762e4610760891fd5d1 @tenderlove tenderlove committed Oct 8, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 activerecord/lib/active_record/associations/join_dependency.rb
@@ -135,7 +135,7 @@ def join_base
def remove_duplicate_results!(base, records, associations)
case associations
- when Symbol, String
+ when Symbol
reflection = base.reflections[associations]
remove_uniq_by_reflection(reflection, records)
when Hash
@@ -154,7 +154,9 @@ def remove_duplicate_results!(base, records, associations)
end
end
- remove_duplicate_results!(reflection.klass, parent_records, associations[name]) unless parent_records.empty?
+ unless parent_records.empty?
+ remove_duplicate_results!(reflection.klass, parent_records, associations[name])
+ end
end
end
end

0 comments on commit d0be8a0

Please sign in to comment.