Current_user improvement added: @current_user ||= User.find(session[:user_id]) if session[:user_id]