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
This commit is contained in:
parent
f22f352ee3
commit
6c67905c1c
@ -143,6 +143,8 @@
|
||||
|
||||
* Stop the MySQL adapter crashing when views are present. #3782 [Jonathan Viney]
|
||||
|
||||
* Don't classify the belongs_to class, it is already singular #4117 [keithm@infused.org]
|
||||
|
||||
* Allow set_fixture_class to take Classes instead of strings for a class in a module. Raise FixtureClassNotFound if a fixture can't load. [Rick Olson]
|
||||
|
||||
* Fix quoting of inheritance column for STI eager loading #4098 [Jonathan Viney <jonathan@bluewire.net.nz>]
|
||||
|
@ -1287,7 +1287,7 @@ def association_join
|
||||
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
|
||||
""
|
||||
|
Loading…
Reference in New Issue
Block a user