From def746030c20697f2c4376515169eeda2f6332b4 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 16 Mar 2006 02:46:01 +0000 Subject: Added Base.abstract_class? that marks which classes are not part of the Active Record hierarchy. closes #3704 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations/has_many_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/has_many_association.rb') diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index b861fde55d..8b471859c1 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -168,7 +168,7 @@ module ActiveRecord when @reflection.options[:as] @finder_sql = "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " + - "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = '#{ActiveRecord::Base.send(:class_name_of_active_record_descendant, @owner.class).to_s}'" + "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote @owner.class.base_class.name.to_s}" @finder_sql << " AND (#{interpolate_sql(@conditions)})" if @conditions else -- cgit v1.2.3