instance method
changed
Ruby on Rails 7.2.3
Since v3.0.20Signature
changed()
Returns an array with the name of the attributes with unsaved changes.
person.changed # => [] person.name = 'bob' person.changed # => ["name"]
Source
# File activemodel/lib/active_model/dirty.rb, line 288
def changed
mutations_from_database.changed_attribute_names
end
Defined in activemodel/lib/active_model/dirty.rb line 288
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty