instance method
changed?
Ruby on Rails 7.1.6
Since v3.0.20Signature
changed?()
Returns true if any of the attributes has unsaved changes, false otherwise.
person.changed? # => false person.name = 'bob' person.changed? # => true
Source
# File activemodel/lib/active_model/dirty.rb, line 279
def changed?
mutations_from_database.any_changes?
end
Defined in activemodel/lib/active_model/dirty.rb line 279
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty