aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorMatt Aimonetti <mattaimonetti@gmail.com>2013-04-14 16:59:23 -0700
committerMatt Aimonetti <mattaimonetti@gmail.com>2013-04-14 16:59:23 -0700
commit280c5ed1f990c4b29ea214eeaf81d95a8407ce93 (patch)
treea91a28f9de38e2884735337decd5b8197859e40e /activerecord/lib/active_record/connection_adapters
parent0ddfd75bf67853f14885ff6fbabc65dedb573470 (diff)
downloadrails-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/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid.rb1
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