Module: Devise::Models::Compatibility

Extended by:
ActiveSupport::Concern
Included in:
PasswordArchivable, SecureValidatable
Defined in:
lib/devise-security/models/compatibility.rb

Instance Method Summary collapse

Instance Method Details

#encrypted_password_before_last_saveObject


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

def encrypted_password_before_last_save
  previous_changes['encrypted_password'].try(:first)
end

#saved_change_to_encrypted_password?Boolean

Returns:

  • (Boolean)

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

def saved_change_to_encrypted_password?
  encrypted_password_changed?
end

#will_save_change_to_encrypted_password?Boolean

Returns:

  • (Boolean)

18
19
20
# File 'lib/devise-security/models/compatibility.rb', line 18

def will_save_change_to_encrypted_password?
  changed_attributes['encrypted_password'].present?
end