Module: Devise::Models::Compatibility::ActiveRecord
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise-security/models/compatibility/active_record.rb
Instance Method Summary collapse
-
#encrypted_password_before_last_save ⇒ String?
The encrypted password that existed before the record was saved.
-
#saved_change_to_encrypted_password? ⇒ Boolean
When the record was saved, was the
encrypted_password
changed?. -
#will_save_change_to_encrypted_password? ⇒ Boolean
When the record is saved, will the
encrypted_password
be changed?.
Instance Method Details
#encrypted_password_before_last_save ⇒ String?
The encrypted password that existed before the record was saved
16 17 18 |
# File 'lib/devise-security/models/compatibility/active_record.rb', line 16 def encrypted_password_before_last_save previous_changes['encrypted_password'].try(:first) end |
#saved_change_to_encrypted_password? ⇒ Boolean
When the record was saved, was the encrypted_password
changed?
9 10 11 |
# File 'lib/devise-security/models/compatibility/active_record.rb', line 9 def saved_change_to_encrypted_password? encrypted_password_changed? end |
#will_save_change_to_encrypted_password? ⇒ Boolean
When the record is saved, will the encrypted_password
be changed?
22 23 24 |
# File 'lib/devise-security/models/compatibility/active_record.rb', line 22 def will_save_change_to_encrypted_password? changed_attributes['encrypted_password'].present? end |