diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2014-12-30 13:33:42 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2014-12-30 13:33:42 -0700 |
commit | 322750e213ee929752a8bb07dbe44b839452e0a3 (patch) | |
tree | 4a51ccd0592e13634e622909889531379a6b99ed /activerecord/lib/active_record/connection_adapters | |
parent | 45280686edd158a54012a86c23cc7ee424cda2c6 (diff) | |
parent | 969ef21d327ec3ada9c5c4b06c1ed92afa55dbec (diff) | |
download | rails-322750e213ee929752a8bb07dbe44b839452e0a3.tar.gz rails-322750e213ee929752a8bb07dbe44b839452e0a3.tar.bz2 rails-322750e213ee929752a8bb07dbe44b839452e0a3.zip |
Merge pull request #17680 from larskanis/fix_bytea_change_detection
PostgreSQL, Fix change detection caused by superfluous bytea unescaping
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb index 997613d7be..6bd1b8ecae 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb @@ -5,6 +5,7 @@ module ActiveRecord class Bytea < Type::Binary # :nodoc: def type_cast_from_database(value) return if value.nil? + return value.to_s if value.is_a?(Type::Binary::Data) PGconn.unescape_bytea(super) end end |