Added logout button

Added logged_in helper to allow us to check whether a user is logged in
to show the appropriate button
This commit is contained in:
Yannick
2020-04-07 20:52:45 +02:00
parent 7e4280d451
commit ab81cf9d5c
2 changed files with 5 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
class ApplicationController < ActionController::Base
helper_method :current_user, :logged_in?
def require_login
redirect_to login_url unless current_user.present?