From eeda42fc11a4b2840bfa9bbdc7f3028638563ac7 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 8 Oct 2013 15:39:02 -0700 Subject: use the API rather than accessing underlying data structures --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index 227e967c95..8ddfe5742e 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -135,7 +135,7 @@ module ActiveRecord def remove_duplicate_results!(base, records, associations) associations.each_key do |name| - reflection = base.reflections[name] + reflection = base.reflect_on_association(name) remove_uniq_by_reflection(reflection, records) parent_records = [] -- cgit v1.2.3