Module: Devise::Models::Compatibility::Mongoid

Extended by:
ActiveSupport::Concern
Defined in:
lib/devise-security/models/compatibility/mongoid.rb

Instance Method Summary collapse

Instance Method Details

#will_save_change_to_email?Boolean

Will saving this record change the email attribute?

Returns:

  • (Boolean)


9
10
11
# File 'lib/devise-security/models/compatibility/mongoid.rb', line 9

def will_save_change_to_email?
  changed.include? 'email'
end

#will_save_change_to_encrypted_password?Boolean

Will saving this record change the encrypted_password attribute?

Returns:

  • (Boolean)


15
16
17
# File 'lib/devise-security/models/compatibility/mongoid.rb', line 15

def will_save_change_to_encrypted_password?
  changed.include? 'encrypted_password'
end