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)