Method: Mongoid::Dirty::InstanceMethods#changed
- Defined in:
- lib/mongoid/dirty.rb
#changed ⇒ Object
Gets the names of all the fields that have changed in the document.
Example:
person = Person.new(:title => "Sir")
person.title = "Madam"
person.changed # returns [ "title" ]
Returns:
An Array of changed field names.
63 64 65 |
# File 'lib/mongoid/dirty.rb', line 63 def changed modifications.keys end |