class ApplicationController < ActionController::Base before_action :authenticate_user private def authenticate_user Current.user = User.find_by(id: session[:current_user_id]) end end