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

class SessionsController < ApplicationController
  def create
    @user = User.from_omniauth(env["omniauth.auth"])
    current_user
    redirect_to root_path
  end

  def destroy
    log_out
    redirect_to root_path
  end
end

Refactor original sessions controller with helper methods
Refactor original sessions controller with helper methods
