aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-05-15 14:08:51 +0000
committerRick Olson <technoweenie@gmail.com>2006-05-15 14:08:51 +0000
commitbe3a4849a909545de444ef6d4f5751eea8a3ba1f (patch)
tree1f2c5beb48a9d1cd83b84e80bce51106560febdb /activerecord/lib/active_record
parent6ef5b747b3d7cfb156ae619b9ba6ec3ea693bf30 (diff)
downloadrails-be3a4849a909545de444ef6d4f5751eea8a3ba1f.tar.gz
rails-be3a4849a909545de444ef6d4f5751eea8a3ba1f.tar.bz2
rails-be3a4849a909545de444ef6d4f5751eea8a3ba1f.zip
Call Inflector#demodulize on the class name when eagerly including an STI model. Closes #5077 [info@loobmedia.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 31546e9c29..717483cf3e 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1515,7 +1515,7 @@ module ActiveRecord
join << %(AND %s.%s = %s ) % [
aliased_table_name,
reflection.active_record.connection.quote_column_name(reflection.active_record.inheritance_column),
- klass.quote(klass.name)] unless klass.descends_from_active_record?
+ klass.quote(klass.name.demodulize)] unless klass.descends_from_active_record?
join << "AND #{interpolate_sql(sanitize_sql(reflection.options[:conditions]))} " if reflection.options[:conditions]
join
end