aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 5f18be2e5..ba1cf4900 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -221,7 +221,11 @@ class ApplicationController < ActionController::Base
if session[:user_id].nil?
return nil
else
- return User.find(session[:user_id])
+ begin
+ return User.find(session[:user_id])
+ rescue ActiveRecord::RecordNotFound
+ return nil
+ end
end
end