agregamos la definicion del metodo require_user en application_controller.rb
This commit is contained in:
parent
4677f90bb2
commit
145314a3c8
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue