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:
1 parent
7e4280d451
commit
ab81cf9d5c
2 files changed
+5
No files matched your search
@@ -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?
|
||||
|
||||
Reference in new issue
Block a user