aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-04-07 12:23:29 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-04-07 12:23:29 -0500
commit6bbbe0b6513d7452cba43680f0da8362b98d4ca5 (patch)
treeba6982905161f77d1530d49dd046a0af4754f3ee /activerecord/lib/active_record
parent83e9e193f86741401a463cae17163ea0cd6b2389 (diff)
parentc4bdca19a7a61eb12c75c4a3225e54b69b486a15 (diff)
downloadrails-6bbbe0b6513d7452cba43680f0da8362b98d4ca5.tar.gz
rails-6bbbe0b6513d7452cba43680f0da8362b98d4ca5.tar.bz2
rails-6bbbe0b6513d7452cba43680f0da8362b98d4ca5.zip
Merge pull request #14632 from matthewd/escape_bytea
Use connection-specific bytea escaping
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
index 210172cf32..ac3b0f713d 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -4,14 +4,14 @@ module ActiveRecord
module Quoting
# Escapes binary strings for bytea input to the database.
def escape_bytea(value)
- PGconn.escape_bytea(value) if value
+ @connection.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)
- PGconn.unescape_bytea(value) if value
+ @connection.unescape_bytea(value) if value
end
# Quotes PostgreSQL-specific data types for SQL input.