From 145314a3c870c0c96b57b040730acd4420831cef Mon Sep 17 00:00:00 2001 From: nopor Date: Tue, 27 Jul 2021 16:13:41 -0300 Subject: [PATCH] agregamos la definicion del metodo require_user en application_controller.rb --- app/controllers/application_controller.rb | 3 +++ 1 file changed, 3 insertions(+) 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