From b445ab986a2c177621a2154b0559be4c700abeeb Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 4 Sep 2006 23:41:13 +0000 Subject: Rename quote to quote_value so the name can be used in AR models. #3628 [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/associations/has_many_through_association.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb') diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 3888bc62ba..d7ca7b5834 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -127,7 +127,7 @@ module ActiveRecord def construct_quoted_owner_attributes(reflection) if as = reflection.options[:as] { "#{as}_id" => @owner.quoted_id, - "#{as}_type" => reflection.klass.quote( + "#{as}_type" => reflection.klass.quote_value( @owner.class.base_class.name.to_s, reflection.klass.columns_hash["#{as}_type"]) } else @@ -164,7 +164,7 @@ module ActiveRecord if @reflection.source_reflection.options[:as] polymorphic_join = "AND %s.%s = %s" % [ @reflection.table_name, "#{@reflection.source_reflection.options[:as]}_type", - @owner.class.quote(@reflection.through_reflection.klass.name) + @owner.class.quote_value(@reflection.through_reflection.klass.name) ] end end -- cgit v1.2.3