use different class variable to determine currently logged in user
parent
0238d49415
commit
33d4a7f0fc
|
@ -5,7 +5,7 @@ class Application < Merb::Controller
|
||||||
|
|
||||||
def current_user
|
def current_user
|
||||||
if session[:user_id]
|
if session[:user_id]
|
||||||
(@user ||= User.find(session[:user_id]))
|
(@_user ||= User.find(session[:user_id]))
|
||||||
else
|
else
|
||||||
(cookies[:session_id] ||= session[:session_id])
|
(cookies[:session_id] ||= session[:session_id])
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue