diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 79418a1..4a05b69 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,12 +9,13 @@ class ApplicationController < ActionController::Base # Omniauth has its own CSRF protect_from_forgery :except => [:callback] - + respond_to :html, :js def cuser begin @cuser ||= User.find(session[:user]) + # Don't error if the user is missing. rescue session[:user] = nil @cuser = nil