agregamos la definicion del metodo require_user en application_controller.rb

This commit is contained in:
nopor 2021-07-27 16:13:41 -03:00
parent 4677f90bb2
commit 145314a3c8

View file

@ -2,6 +2,9 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
before_action :authenticate_user! before_action :authenticate_user!
def require_user
redirect_to root_path unless current_user
end
def index def index
end end
end end