Defect #30753 » 0001-adds-plugins-lib-directory-to-auto-eager-load-paths-.patch
| lib/redmine/plugin.rb | ||
|---|---|---|
| 113 | 113 |
Rails.application.config.eager_load_paths += [dir] if Rails.application.config.eager_load |
| 114 | 114 |
end |
| 115 | 115 | |
| 116 |
# Adds the lib/ directory of the plugin to the autoload path |
|
| 117 |
lib = File.expand_path(File.join(p.directory, 'lib')) |
|
| 118 |
if File.directory?(lib) |
|
| 119 |
ActiveSupport::Dependencies.autoload_paths += [lib] |
|
| 120 |
Rails.application.config.eager_load_paths += [lib] if Rails.application.config.eager_load |
|
| 121 |
end |
|
| 122 | ||
| 116 | 123 |
# Defines plugin setting if present |
| 117 | 124 |
if p.settings |
| 118 | 125 |
Setting.define_plugin_setting p |