From: Go MAEDA Date: Wed, 21 Dec 2022 01:36:45 +0000 (+0000) Subject: Modifying the source code of a plugin does not reload it after r21295 ( #36273). X-Git-Tag: 5.1.0~327 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f376fb68673bb74175943a9f37e7f9bb442bf155;p=redmine.git Modifying the source code of a plugin does not reload it after r21295 ( #36273). Patch by Takashi Kato. git-svn-id: https://svn.redmine.org/redmine/trunk@21992 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/config/initializers/zeitwerk.rb b/config/initializers/zeitwerk.rb index f5630b3ee..ab86b28e2 100644 --- a/config/initializers/zeitwerk.rb +++ b/config/initializers/zeitwerk.rb @@ -2,6 +2,7 @@ lib = Rails.root.join('lib/redmine') Rails.autoloaders.main.push_dir lib, namespace: Redmine +Rails.application.config.watchable_dirs[lib] = [:rb] IGNORE_LIST = [ 'wiki_formatting/textile/redcloth3.rb', diff --git a/lib/redmine/plugin_loader.rb b/lib/redmine/plugin_loader.rb index be7f914f4..16b18fff5 100644 --- a/lib/redmine/plugin_loader.rb +++ b/lib/redmine/plugin_loader.rb @@ -128,6 +128,7 @@ module Redmine engine_cfg.paths.add 'lib', eager_load: true engine_cfg.eager_load_paths.each do |dir| Rails.autoloaders.main.push_dir dir + Rails.application.config.watchable_dirs[dir] = [:rb] end end end