aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 4e6ee6e216..0aa7c42f1d 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -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>]
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
""