From 3bec1603f9392201998269456707dd854b4710cb Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Sat, 9 Nov 2013 20:53:11 +0100 Subject: type casted PG bytea values are represented as a Hash. This is a follow up to: 97f0d9a0dd12e7ad634815eecfeff866f64aad92 This change is also related to: df0edafac9eb47cd971970a9e7b13a3eaddf214e --- activerecord/lib/active_record/log_subscriber.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/lib/active_record/log_subscriber.rb') 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 -- cgit v1.2.3