instance method
changed_in_place?
Ruby on Rails 7.2.3
Since v5.2.8.1Signature
changed_in_place?(raw_old_value, new_value)
Determines whether the mutable value has been modified since it was read. Returns false by default. If your type returns an object which could be mutated, you should override this method. You will need to either:
-
pass
new_valueto Value#serialize and compare it toraw_old_value
or
-
pass
raw_old_valueto Value#deserialize and compare it tonew_value
raw_old_value The original value, before being passed to deserialize.
new_value The current value, after type casting.
Parameters
-
raw_old_valuereq -
new_valuereq
Source
# File activemodel/lib/active_model/type/value.rb, line 105
def changed_in_place?(raw_old_value, new_value)
false
end
Defined in activemodel/lib/active_model/type/value.rb line 105
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Type::Value