aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 6a2887e528..2a0c4db82d 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1617,7 +1617,7 @@ module ActiveRecord
klass.quote_value(reflection.options[:source_type])
]
else
- second_key = source_reflection.options[:foreign_key] || klass.to_s.foreign_key
+ second_key = source_reflection.primary_key_name
end
end