diff options
author | Matt Aimonetti <mattaimonetti@gmail.com> | 2013-04-14 16:59:23 -0700 |
---|---|---|
committer | Matt Aimonetti <mattaimonetti@gmail.com> | 2013-04-14 16:59:23 -0700 |
commit | 280c5ed1f990c4b29ea214eeaf81d95a8407ce93 (patch) | |
tree | a91a28f9de38e2884735337decd5b8197859e40e /activerecord/lib/active_record | |
parent | 0ddfd75bf67853f14885ff6fbabc65dedb573470 (diff) | |
download | rails-280c5ed1f990c4b29ea214eeaf81d95a8407ce93.tar.gz rails-280c5ed1f990c4b29ea214eeaf81d95a8407ce93.tar.bz2 rails-280c5ed1f990c4b29ea214eeaf81d95a8407ce93.zip |
fix for the bytea/binary nil value bug
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb index 51f377dfd7..14c97dcefc 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb @@ -20,6 +20,7 @@ module ActiveRecord class Bytea < Type def type_cast(value) + return if value.nil? PGconn.unescape_bytea value end end |