aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-06-02 12:24:31 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-06-02 12:24:31 -0400
commit62d316c6d88595940d6da08b3e6c97f9ca2aec1d (patch)
tree49ae0076ff12a85d588857ef2864dbf1dd09cc81 /activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb
parentfeefa9fc9803780713f61c6eded0785e3844a681 (diff)
parentf7388635f246b97a1aa0be54579339c6659fb865 (diff)
downloadrails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.tar.gz
rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.tar.bz2
rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.zip
Merge branch 'master' into unlock-minitest
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb
index 87391b5dc7..a1fec289d4 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb
@@ -2,20 +2,10 @@ module ActiveRecord
module ConnectionAdapters
module PostgreSQL
module OID # :nodoc:
- class Jsonb < Json # :nodoc:
+ class Jsonb < Type::Json # :nodoc:
def type
:jsonb
end
-
- def changed_in_place?(raw_old_value, new_value)
- # Postgres does not preserve insignificant whitespaces when
- # round-tripping jsonb columns. This causes some false positives for
- # the comparison here. Therefore, we need to parse and re-dump the
- # raw value here to ensure the insignificant whitespaces are
- # consistent with our encoder's output.
- raw_old_value = serialize(deserialize(raw_old_value))
- super(raw_old_value, new_value)
- end
end
end
end