From 9104d63f9917df5a363e073f62402a91a16ccf40 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 20 Nov 2006 12:02:04 +0000 Subject: Quote ActiveSupport::Multibyte::Chars. Closes #6653. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index 94d1d9c43f..0f2008deb5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -8,7 +8,8 @@ module ActiveRecord return value.quoted_id if value.respond_to?(:quoted_id) case value - when String + when String, ActiveSupport::Multibyte::Chars + value = value.to_s if column && column.type == :binary && column.class.respond_to?(:string_to_binary) "'#{quote_string(column.class.string_to_binary(value))}'" # ' (for ruby-mode) elsif column && [:integer, :float].include?(column.type) -- cgit v1.2.3