added user lookup in application controller by auth_token
This commit is contained in:
@@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
|
|||||||
private
|
private
|
||||||
|
|
||||||
def current_user
|
def current_user
|
||||||
@current_user ||= User.find_by_user_id(session[:user_id].to_s)
|
@current_user ||= User.find_by_auth_token!(cookies[:auth_token].to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
def authenticated
|
def authenticated
|
||||||
|
|||||||
Reference in New Issue
Block a user