diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb index a94259a875..4ab4fc8aa3 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb @@ -13,6 +13,10 @@ module ActiveRecord class Type def type; end + + def type_cast_for_write(value) + value + end end class Identity < Type diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index d61ca17391..5b150f2731 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -39,12 +39,6 @@ module ActiveRecord super(name, self.class.extract_value_from_default(default), sql_type, null) end - def type_cast(value) - return super unless sql_type == 'bytea' - - PGconn.unescape_bytea(value) if value - end - # :stopdoc: class << self attr_accessor :money_precision |