summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-06 12:22:11 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-06 12:22:11 -0400
commit0d42079611ed2aeacd71b926580fdc3b943cf1ba (patch)
treeafc0f14d06d497283885ab915ade6539d4f055c2 /app/helpers
parent000cd5558ac21c11060da721d76a27f0531fcfa8 (diff)
make editing user permissions work
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/sessions_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
index ac62cdc..499e988 100644
--- a/app/helpers/sessions_helper.rb
+++ b/app/helpers/sessions_helper.rb
@@ -20,7 +20,7 @@ module SessionsHelper
def current_user
@token ||= Session.hash_token(cookies[:remember_token])
@session ||= Session.find_by(token: @token)
- @current_user ||= (@session.nil? ? NilUser.new : @session.user)
+ @current_user ||= (@session.nil? ? User::NilUser.new : @session.user)
end
# checks if someone is currently signed in
@@ -32,7 +32,7 @@ module SessionsHelper
if signed_in?
@session.destroy
end
- @current_user = NilUser.new
+ @current_user = User::NilUser.new
cookies.delete(:remember_token)
end