Defect #30753 » 0001-adds-lib-directory-of-plugins-to-eager_load_paths.patch
| lib/redmine/plugin.rb | ||
|---|---|---|
|
Rails.application.config.autoload_paths += engine_cfg.autoload_paths
|
||
|
ActiveSupport::Dependencies.autoload_paths += engine_cfg.eager_load_paths + engine_cfg.autoload_once_paths + engine_cfg.autoload_paths
|
||
|
# Adds the lib/ directory of the plugin to the auto / eagerload path
|
||
|
lib = File.expand_path(File.join(p.directory, 'lib'))
|
||
|
if File.directory?(lib)
|
||
|
ActiveSupport::Dependencies.autoload_paths += [lib]
|
||
|
Rails.application.config.eager_load_paths += [lib] if Rails.application.config.eager_load
|
||
|
end
|
||
|
# Defines plugin setting if present
|
||
|
if p.settings
|
||
|
Setting.define_plugin_setting p
|
||