Guest User

Untitled

a guest
Apr 27th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class SessionsController < ApplicationController
  2. def create
  3. user = User.from_omniauth(env["omniauth.auth"])
  4. session[:user_id] = user.id
  5. redirect_to root_path
  6. end
  7.  
  8. def destroy
  9. session[:user_id] = nil
  10. redirect_to root_path
  11. end
  12. end
Add Comment
Please, Sign In to add comment