You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
has_secure_password does several interesting things. It adds password and password_confirmation methods to your model, but only stores a bcrypt-encrypted password to the database
It automatically adds validations to check for the presence of password and a matching password_confirmation value—neither of which is saved to the database unencrypted—upon creating a new record. It also adds an authenticate method.
All has_secure_password requires is that your database table have a column called password_digest.
Lab: create_users migration
Generate a create_users migration now. Include the following columns, all strings: