Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SessionsController < ApplicationController
- def create
- user = User.from_omniauth(env["omniauth.auth"])
- session[:user_id] = user.id
- redirect_to root_path
- end
- def destroy
- session[:user_id] = nil
- redirect_to root_path
- end
- end
Add Comment
Please, Sign In to add comment