Module: Devise::Models::Compatibility
- Extended by:
- ActiveSupport::Concern
- Included in:
- PasswordArchivable, SecureValidatable
- Defined in:
- lib/devise-security/models/compatibility.rb
Instance Method Summary collapse
- #encrypted_password_before_last_save ⇒ Object
- #saved_change_to_encrypted_password? ⇒ Boolean
- #will_save_change_to_encrypted_password? ⇒ Boolean
Instance Method Details
#encrypted_password_before_last_save ⇒ Object
12 13 14 |
# File 'lib/devise-security/models/compatibility.rb', line 12 def encrypted_password_before_last_save previous_changes['encrypted_password'].try(:first) end |
#saved_change_to_encrypted_password? ⇒ Boolean
8 9 10 |
# File 'lib/devise-security/models/compatibility.rb', line 8 def saved_change_to_encrypted_password? encrypted_password_changed? end |
#will_save_change_to_encrypted_password? ⇒ Boolean
16 17 18 |
# File 'lib/devise-security/models/compatibility.rb', line 16 def will_save_change_to_encrypted_password? changed_attributes['encrypted_password'].present? end |