instance method
previous_changes
Ruby on Rails 3.0.20
Since v3.0.20Signature
previous_changes()
Map of attributes that were changed when the model was saved.
person.name # => 'bob' person.name = 'robert' person.save person.previous_changes # => {'name' => ['bob, 'robert']}
Source
# File activemodel/lib/active_model/dirty.rb, line 126
def previous_changes
@previously_changed
end
Defined in activemodel/lib/active_model/dirty.rb line 126
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty