aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-02-01 17:48:16 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-02-01 17:48:28 -0800
commit00e192ef1f613339b2f0fadd537b5e3c9e9f8cbf (patch)
tree3e560cd8cdc131433603e6ccb00533d7053d1a7a /activerecord
parent66fc1d6ac8f0f7b797ae18fdcb15cd618e4251f1 (diff)
downloadrails-00e192ef1f613339b2f0fadd537b5e3c9e9f8cbf.tar.gz
rails-00e192ef1f613339b2f0fadd537b5e3c9e9f8cbf.tar.bz2
rails-00e192ef1f613339b2f0fadd537b5e3c9e9f8cbf.zip
use the class method to (un)escape binary values
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 1d8e5d813a..039f6e1bd1 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -455,14 +455,14 @@ module ActiveRecord
# Escapes binary strings for bytea input to the database.
def escape_bytea(value)
- @connection.escape_bytea(value) if value
+ PGconn.escape_bytea(value) if value
end
# Unescapes bytea output from a database to the binary string it represents.
# NOTE: This is NOT an inverse of escape_bytea! This is only to be used
# on escaped binary output from database drive.
def unescape_bytea(value)
- @connection.unescape_bytea(value) if value
+ PGconn.unescape_bytea(value) if value
end
# Quotes PostgreSQL-specific data types for SQL input.