has secure password

suggest change

Create User Model

rails generate model User email:string password_digest:string

Add has_secure_password module to User model

class User < ActiveRecord::Basehas_secure_passwordend

Now you can create a new user with password

user = User.new email: 'bob@bob.com', password: 'Password1', password_confirmation: 'Password1'

Verify password with authenticate method

user.authenticate('somepassword')

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


User Authentication in Rails:
*has secure password

Table Of Contents
9User Authentication in Rails
55CSV