From ee7516436ebb0c415c1b977dfde0fcf42ac017f4 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 23 Jul 2013 17:08:04 -0700 Subject: oops! --- activerecord/lib/active_record/reflection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index d3a56c870a..73d154e03e 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -594,7 +594,7 @@ module ActiveRecord # We want to use the klass from this reflection, rather than just delegate straight to # the source_reflection, because the source_reflection may be polymorphic. We still # need to respect the source_reflection's :primary_key option, though. - def association_primary_key(target_class = nil) + def association_primary_key(klass = nil) # Get the "actual" source reflection if the immediate source reflection has a # source reflection itself actual_source_reflection.options[:primary_key] || primary_key(klass || self.klass) -- cgit v1.2.3