module Devise::Orm::DirtyTrackingActiveRecordMethods

def devise_email_before_last_save

def devise_email_before_last_save
  email_before_last_save
end

def devise_email_in_database

def devise_email_in_database
  email_in_database
end

def devise_respond_to_and_will_save_change_to_attribute?(attribute)

def devise_respond_to_and_will_save_change_to_attribute?(attribute)
  respond_to?("will_save_change_to_#{attribute}?") && send("will_save_change_to_#{attribute}?")
end

def devise_saved_change_to_email?

def devise_saved_change_to_email?
  saved_change_to_email?
end

def devise_saved_change_to_encrypted_password?

def devise_saved_change_to_encrypted_password?
  saved_change_to_encrypted_password?
end

def devise_unconfirmed_email_will_change!

def devise_unconfirmed_email_will_change!
  unconfirmed_email_will_change!
end

def devise_will_save_change_to_email?

def devise_will_save_change_to_email?
  will_save_change_to_email?
end