From 5e77872ac9da3007d6bc0b86428dca9ac8881936 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 29 Sep 2010 10:23:03 -0700 Subject: use consistent method calls for column inspection --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 91e323e672..c9911af9ff 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -315,7 +315,7 @@ module ActiveRecord def quote(value, column = nil) #:nodoc: return super unless column - if value.kind_of?(String) && column.type == :binary + if value.kind_of?(String) && column.sql_type == 'bytea' "'#{escape_bytea(value)}'" elsif value.kind_of?(String) && column.sql_type == 'xml' "xml '#{quote_string(value)}'" -- cgit v1.2.3