Simplify complex conditional, add frozen strings

This commit is contained in:
Sam 2018-01-15 12:43:07 +11:00
parent 234aa68bf8
commit 2113266e51
1 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require File.expand_path('../boot', __FILE__)
require 'rails/all'
@ -183,10 +185,13 @@ module Discourse
config.ember.handlebars_location = "#{Rails.root}/vendor/assets/javascripts/handlebars.js"
require 'auth'
Discourse.activate_plugins! unless Rails.env.test? && ENV['LOAD_PLUGINS'] != "1"
if GlobalSetting.relative_url_root.present?
config.relative_url_root = GlobalSetting.relative_url_root
if Rails.env == "test"
if ENV['LOAD_PLUGINS'] == "1"
Discourse.activate_plugins!
end
else
Discourse.activate_plugins!
end
require_dependency 'stylesheet/manager'