Project

General

Profile

Defect #30753 » 0001-adds-plugins-lib-directory-to-auto-eager-load-paths-.patch

Jens Krämer, 2019-02-24 01:51

View differences:

lib/redmine/plugin.rb
Rails.application.config.eager_load_paths += [dir] if Rails.application.config.eager_load
end
# Adds the lib/ directory of the plugin to the autoload 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
(2-2/4)