aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/log_subscriber.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-09 20:53:11 +0100
committerYves Senn <yves.senn@gmail.com>2013-11-09 20:55:01 +0100
commit3bec1603f9392201998269456707dd854b4710cb (patch)
tree6bd80ec1c133717dd5354f0d3ee49b3eb4be7faa /activerecord/lib/active_record/log_subscriber.rb
parentdf0edafac9eb47cd971970a9e7b13a3eaddf214e (diff)
downloadrails-3bec1603f9392201998269456707dd854b4710cb.tar.gz
rails-3bec1603f9392201998269456707dd854b4710cb.tar.bz2
rails-3bec1603f9392201998269456707dd854b4710cb.zip
type casted PG bytea values are represented as a Hash.
This is a follow up to: 97f0d9a0dd12e7ad634815eecfeff866f64aad92 This change is also related to: df0edafac9eb47cd971970a9e7b13a3eaddf214e
Diffstat (limited to 'activerecord/lib/active_record/log_subscriber.rb')
-rw-r--r--activerecord/lib/active_record/log_subscriber.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb
index 927fbab8f0..654ef21b07 100644
--- a/activerecord/lib/active_record/log_subscriber.rb
+++ b/activerecord/lib/active_record/log_subscriber.rb
@@ -23,6 +23,8 @@ module ActiveRecord
def render_bind(column, value)
if column
if column.binary?
+ # This specifically deals with the PG adapter that casts bytea columns into a Hash.
+ value = value[:value] if value.is_a?(Hash)
value = "<#{value.bytesize} bytes of binary data>"
end