Fix a bug when user was deleted

This commit is contained in:
Ari Timonen 2020-04-10 19:58:36 +03:00
parent bfe19eb5e9
commit 1abc42851a

View file

@ -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