- add route for
new_user_path
- create a
UsersController
with new action - create
new.html.erb
- generate user model with
password_digest
string field - uncomment
gem 'bcrypt'
in Gemfile and addhas_secure_password
in User model - add
create
action in UsersController - implement logic for creating a user
- set
session[:user_id]
in create action - add route for
user_path
(the show action) - add
show
action in UsersController - add
show.html.erb
- create
current_user
helper method in ApplicationController
- add
login
route - create
SessionsController
- add
new
action inSessionsController
- add
new.html.erb
- make login form in
new.html.erb
- add post route for login
- add
create
action inSessionsController
- implement
create
action: find user, authenticate user, set session[:user_id], and redirect
- add
logout
link - add
logout
route - add
destroy
action inSessionsController
- clear the session and redirect