diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 10:23:03 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 10:36:33 -0700 |
commit | 5e77872ac9da3007d6bc0b86428dca9ac8881936 (patch) | |
tree | d64923931e58d2044f96f9a2aeafdc5aa56e386c /activerecord/lib | |
parent | df9abfab6f213440d3c4dd75973a1ffa8a21b34b (diff) | |
download | rails-5e77872ac9da3007d6bc0b86428dca9ac8881936.tar.gz rails-5e77872ac9da3007d6bc0b86428dca9ac8881936.tar.bz2 rails-5e77872ac9da3007d6bc0b86428dca9ac8881936.zip |
use consistent method calls for column inspection
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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)}'" |