instance method
changed?
Ruby on Rails 3.1.12
Since v3.0.20Signature
changed?()
Returns true if any attribute have unsaved changes, false otherwise.
person.changed? # => false person.name = 'bob' person.changed? # => true
Source
# File activemodel/lib/active_model/dirty.rb, line 100
def changed?
!changed_attributes.empty?
end
Defined in activemodel/lib/active_model/dirty.rb line 100
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty