aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/log_subscriber.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/log_subscriber.rb')
-rw-r--r--activerecord/lib/active_record/log_subscriber.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb
index 2366a91bb5..c1ba524c84 100644
--- a/activerecord/lib/active_record/log_subscriber.rb
+++ b/activerecord/lib/active_record/log_subscriber.rb
@@ -21,13 +21,15 @@ module ActiveRecord
end
def render_bind(column, value)
- if column.type == :binary
- rendered_value = "<#{value.bytesize} bytes of binary data>"
+ if column
+ if column.binary?
+ value = "<#{value.bytesize} bytes of binary data>"
+ end
+
+ [column.name, value]
else
- rendered_value = value
+ [nil, value]
end
-
- [column.name, rendered_value]
end
def sql(event)