method
changed?
v6.0.0 -
Show latest stable
- Class:
ActiveModel::AttributeMutationTracker
changed?(attr_name, from: OPTION_NOT_GIVEN, to: OPTION_NOT_GIVEN)public
No documentation available.
# File activemodel/lib/active_model/attribute_mutation_tracker.rb, line 45
def changed?(attr_name, from: OPTION_NOT_GIVEN, to: OPTION_NOT_GIVEN)
attribute_changed?(attr_name) &&
(OPTION_NOT_GIVEN == from || original_value(attr_name) == from) &&
(OPTION_NOT_GIVEN == to || fetch_value(attr_name) == to)
end