use consistent method calls for column inspection

This commit is contained in:
Aaron Patterson 2010-09-29 10:23:03 -07:00
parent df9abfab6f
commit 5e77872ac9
1 changed files with 1 additions and 1 deletions

View File

@ -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)}'"