Class: ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::MysqlJson

Inherits:
Type::Internal::AbstractJson show all
Defined in:
lib/active_record/connection_adapters/abstract_mysql_adapter.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Type::Internal::AbstractJson

#accessor, #deserialize, #serialize, #type

Instance Method Details

#changed_in_place?(raw_old_value, new_value) ⇒ Boolean

Returns:

  • (Boolean)


918
919
920
921
922
# File 'lib/active_record/connection_adapters/abstract_mysql_adapter.rb', line 918

def changed_in_place?(raw_old_value, new_value)
  # Normalization is required because MySQL JSON data format includes
  # the space between the elements.
  super(serialize(deserialize(raw_old_value)), new_value)
end