Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Bytea

Inherits:
Type::Binary
  • Object
show all
Defined in:
lib/active_record/connection_adapters/postgresql/oid/bytea.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#deserialize(value) ⇒ Object



6
7
8
9
10
# File 'lib/active_record/connection_adapters/postgresql/oid/bytea.rb', line 6

def deserialize(value)
  return if value.nil?
  return value.to_s if value.is_a?(Type::Binary::Data)
  PG::Connection.unescape_bytea(super)
end