1
0
Fork 0
find-us-lunch/app/controllers/sessions_controller.rb
2014-10-02 16:47:08 -04:00

14 lines
259 B
Ruby

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