diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9ecb8c9..79418a1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,7 +13,12 @@ class ApplicationController < ActionController::Base respond_to :html, :js def cuser - @cuser ||= User.find(session[:user]) if session[:user] + begin + @cuser ||= User.find(session[:user]) + rescue + session[:user] = nil + @cuser = nil + end end def return_here