changed()
Returns an array with the name of the attributes with unsaved changes.
person.changed # => [] person.name = 'bob' person.changed # => ["name"]
# File activemodel/lib/active_model/dirty.rb, line 141 def changed changed_attributes.keys end