Method: Devise::Models::DatabaseAuthenticatable#password=
- Defined in:
- lib/devise/models/database_authenticatable.rb
#password=(new_password) ⇒ Object
Generates a hashed password based on the given value. For legacy reasons, we use encrypted_password to store the hashed password.
38 39 40 41 |
# File 'lib/devise/models/database_authenticatable.rb', line 38 def password=(new_password) @password = new_password self.encrypted_password = password_digest(@password) if @password.present? end |