diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-18 20:20:30 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-18 20:20:30 +0000 |
commit | 6c67905c1c1acdb88b55fdc074399aecc6835d41 (patch) | |
tree | d494915fcfa5f04a09122a459ec3dbcb286f6e7d /activerecord/lib | |
parent | f22f352ee3316a6f8da4b19e816802bc8d371db6 (diff) | |
download | rails-6c67905c1c1acdb88b55fdc074399aecc6835d41.tar.gz rails-6c67905c1c1acdb88b55fdc074399aecc6835d41.tar.bz2 rails-6c67905c1c1acdb88b55fdc074399aecc6835d41.zip |
Fixed that eager loading from belongs_to would cause the association to be double-singularized (closes #4117) [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index a982279b03..94af33d777 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1287,7 +1287,7 @@ module ActiveRecord when :belongs_to " LEFT OUTER JOIN %s ON %s.%s = %s.%s " % [ table_name_and_alias, aliased_table_name, reflection.klass.primary_key, - parent.aliased_table_name, options[:foreign_key] || klass.to_s.classify.foreign_key + parent.aliased_table_name, options[:foreign_key] || klass.to_s.foreign_key ] else "" |