diff options
author | Marian Rudzynski <mr@impaled.org> | 2011-05-26 11:00:27 +0200 |
---|---|---|
committer | Marian Rudzynski <mr@impaled.org> | 2011-05-26 11:00:27 +0200 |
commit | 1f7c3d02645c6b72e5d1428bc7da6668cdee5fa8 (patch) | |
tree | b18e2f51ba10bc66caac831b4b8d10270cf9a761 /activerecord/lib/active_record | |
parent | badc72f3e645b4176b04a4f5181a7f8a04a32f09 (diff) | |
download | rails-1f7c3d02645c6b72e5d1428bc7da6668cdee5fa8.tar.gz rails-1f7c3d02645c6b72e5d1428bc7da6668cdee5fa8.tar.bz2 rails-1f7c3d02645c6b72e5d1428bc7da6668cdee5fa8.zip |
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]) )) |