module ActiveModel::Type::Helpers::Mutable

def cast(value)

def cast(value)
  deserialize(serialize(value))
end

def changed_in_place?(raw_old_value, new_value)

cast value.
value (likely a string). +new_value+ will be the current, type
+raw_old_value+ will be the `_before_type_cast` version of the
def changed_in_place?(raw_old_value, new_value)
  raw_old_value != serialize(new_value)
end