diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-03-15 07:58:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-03-15 07:58:07 +0000 |
commit | 2010cdc1a30b30adfbda44da93a9abb1e2d841ea (patch) | |
tree | 279a90b0f7f6547174eb112ecfbb2977bc75f9dd | |
parent | 8d7386c3fa125678ba650f1919cebe204e269b3d (diff) | |
download | redmine-2010cdc1a30b30adfbda44da93a9abb1e2d841ea.tar.gz redmine-2010cdc1a30b30adfbda44da93a9abb1e2d841ea.zip |
Add plugin lib directory to rails autoload paths (#30753).
git-svn-id: http://svn.redmine.org/redmine/trunk@17958 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/plugin.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index ec575d17a..8b43ff2f5 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -111,6 +111,7 @@ module Redmine # Add the plugin directories to rails autoload paths engine_cfg = Rails::Engine::Configuration.new(p.directory) + engine_cfg.paths.add 'lib', eager_load: true Rails.application.config.eager_load_paths += engine_cfg.eager_load_paths Rails.application.config.autoload_once_paths += engine_cfg.autoload_once_paths Rails.application.config.autoload_paths += engine_cfg.autoload_paths |