fix 500 that could occur on log out

This commit is contained in:
Andrew Brown 2018-01-01 17:19:48 -06:00
parent 9b9e34c188
commit 0edd9950a7
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery
before_action do
if params[:universe].present?
if params[:universe].present? && user_signed_in?
if params[:universe] == 'all'
session.delete(:universe_id)
elsif params[:universe].is_a?(String) && params[:universe].to_i.to_s == params[:universe]

View File

@ -15,6 +15,7 @@ class UsersController < ApplicationController
}) if Rails.env.production?
end
#todo use the new constants here
[
:characters, :locations, :items, :creatures, :races, :religions, :groups, :magics, :languages, :floras, :scenes, :countries, :towns, :landmarks, :universes
].each do |content_type_name|