module ActiveModel::Dirty

def changed?

person.changed? # => true
person.name = 'bob'
person.changed? # => false

Returns +true+ if any of the attributes have unsaved changes, +false+ otherwise.
def changed?
  changed_attributes.present?
end