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



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

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