From 2d28f82705435e76b9b0861f4e5aa4dad74bd61c Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Mon, 27 Sep 2021 08:46:42 +0000 Subject: [PATCH 8/8] Change autoload mode from classic to zeitwerk --- config/application.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index fc6e6a33f4..d3f1a3461e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,7 +24,9 @@ module RedmineApp # -- all .rb files in that directory are automatically loaded. # Custom directories with classes and modules you want to be autoloadable. - config.autoload_paths += %W(#{config.root}/lib) + config.autoloader = :zeitwerk + config.autoload_paths += %W(#{config.root}/lib/autoloads) + config.eager_load_paths += %W(#{config.root}/lib/autoloads) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. -- 2.11.0