diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-05-26 13:08:10 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-05-26 13:08:10 -0700 |
commit | 602fff1f58dff5cfdf861b48626b32f99fe27246 (patch) | |
tree | 2fdfc00803474852ab3148d5738d3de2bfa152c7 /activerecord/lib/active_record | |
parent | 09e431aa893bb1d08705381e2bfcd006de22a70e (diff) | |
parent | f4ed56df43b1f88dca46b1a343ede55e649b327e (diff) | |
download | rails-602fff1f58dff5cfdf861b48626b32f99fe27246.tar.gz rails-602fff1f58dff5cfdf861b48626b32f99fe27246.tar.bz2 rails-602fff1f58dff5cfdf861b48626b32f99fe27246.zip |
Merge pull request #1323 from fx/association_primary_key
use association_primary_key in AssociationScope#add_constraints
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/association_scope.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb index 94847bc2ae..9e6d9e73c5 100644 --- a/activerecord/lib/active_record/associations/association_scope.rb +++ b/activerecord/lib/active_record/associations/association_scope.rb @@ -60,7 +60,7 @@ module ActiveRecord scope = scope.joins(join( join_table, - table[reflection.active_record_primary_key]. + table[reflection.association_primary_key]. eq(join_table[reflection.association_foreign_key]) )) |