module ActiveModel::Dirty
def changed?
person.name = 'bob'
person.changed? # => false
Returns +true+ if any of the attributes have unsaved changes, +false+ otherwise.
def changed? changed_attributes.present? end
def changed? changed_attributes.present? end