From 9160ef03536e4eea0302bddf24c0907a54571193 Mon Sep 17 00:00:00 2001 From: Michael Hartl Date: Sun, 2 Jan 2011 14:22:48 -0800 Subject: [PATCH] Added a necessary self in self.current_user = --- app/helpers/sessions_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb index 1b462c4..fc79f4d 100644 --- a/app/helpers/sessions_helper.rb +++ b/app/helpers/sessions_helper.rb @@ -2,7 +2,7 @@ module SessionsHelper def sign_in(user) cookies.permanent.signed[:remember_token] = [user.id, user.salt] - current_user = user + self.current_user = user end def current_user=(user) @@ -19,7 +19,7 @@ def signed_in? def sign_out cookies.delete(:remember_token) - current_user = nil + self.current_user = nil end def current_user?(user)