aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-29 10:23:03 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-29 10:36:33 -0700
commit5e77872ac9da3007d6bc0b86428dca9ac8881936 (patch)
treed64923931e58d2044f96f9a2aeafdc5aa56e386c /activerecord/lib
parentdf9abfab6f213440d3c4dd75973a1ffa8a21b34b (diff)
downloadrails-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.rb2
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)}'"