instance method
changed
Ruby on Rails 6.0.6
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 164
def changed
mutations_from_database.changed_attribute_names
end
Defined in activemodel/lib/active_model/dirty.rb line 164
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty