diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-12 17:27:10 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-12 17:27:10 +0100 |
commit | dc39aceb94fa810f8d7e263c0293f325fbf9a109 (patch) | |
tree | 29f60704ab32c613f785ff86b4c4f7a54b265570 /activerecord/lib/active_record/associations | |
parent | 61073861856110b4a842a4d5e1033698fd52901f (diff) | |
download | rails-dc39aceb94fa810f8d7e263c0293f325fbf9a109.tar.gz rails-dc39aceb94fa810f8d7e263c0293f325fbf9a109.tar.bz2 rails-dc39aceb94fa810f8d7e263c0293f325fbf9a109.zip |
Adding test_has_many_through_has_one_with_has_many_through_source_reflection and modifying ThroughAssociationScope to make it work correctly.
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/through_association_scope.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/through_association_scope.rb b/activerecord/lib/active_record/associations/through_association_scope.rb index 81e29f047b..09f92332cf 100644 --- a/activerecord/lib/active_record/associations/through_association_scope.rb +++ b/activerecord/lib/active_record/associations/through_association_scope.rb @@ -73,7 +73,7 @@ module ActiveRecord case left.macro when :belongs_to left_primary_key = left.klass.primary_key - right_primary_key = right.primary_key_name + right_primary_key = left.primary_key_name when :has_many, :has_one left_primary_key = left.primary_key_name right_primary_key = right.klass.primary_key |