diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3d5e607..75f7187 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,6 +2,9 @@ class ApplicationController < ActionController::Base before_action :authenticate_user! + def require_user + redirect_to root_path unless current_user + end def index end end