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,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