mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
fix 500 that could occur on log out
This commit is contained in:
parent
9b9e34c188
commit
0edd9950a7
@ -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]
|
||||
|
||||
@ -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|
|
||||
|
||||
Loading…
Reference in New Issue
Block a user