changed()
List of attributes with unsaved changes.
person.changed # => [] person.name = 'bob' person.changed # => ['name']
# File activerecord/lib/active_record/dirty.rb, line 65 def changed changed_attributes.keys end