aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb
blob: 89b203d2b1881f70ac63c864ae5a6a7eeb548b63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :nodoc:
        class Bytea < Type::Binary
          def type_cast_from_database(value)
            return if value.nil?
            PGconn.unescape_bytea(super)
          end
        end
      end
    end
  end
end