From 6b13d748683e1efa871da4235a3090991975067c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sat, 12 Aug 2017 04:22:22 +0200 Subject: [PATCH] FIX: ensure we always reload TopicView and TopicList in dev --- config/application.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index a0a9920d48f..4b807dfac73 100644 --- a/config/application.rb +++ b/config/application.rb @@ -176,7 +176,7 @@ 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") + 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 @@ -197,6 +197,8 @@ module Discourse require_dependency 'post_revision' require_dependency 'notification' require_dependency 'topic_user' + require_dependency 'topic_view' + require_dependency 'topic_list' require_dependency 'group' require_dependency 'user_field' require_dependency 'post_action_type' @@ -205,9 +207,9 @@ module Discourse # So open id logs somewhere sane OpenID::Util.logger = Rails.logger - if plugins = Discourse.plugins - plugins.each { |plugin| plugin.notify_after_initialize } - end + + # Load plugins + Discourse.plugins.each(&:notify_after_initialize) # This nasty hack is required for not precompiling QUnit assets # in test mode. see: https://github.com/rails/sprockets-rails/issues/299#issuecomment-167701012