mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-21 07:51:12 +00:00
Plugin eager_load should depend on environment setting instead of name (#30725).
Patch by Florian Schwab. git-svn-id: http://svn.redmine.org/redmine/trunk@17841 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7ca65bedc0
commit
f65f1d37bf
@ -110,7 +110,7 @@ module Redmine
|
|||||||
# Adds the app/{controllers,helpers,models} directories of the plugin to the autoload path
|
# Adds the app/{controllers,helpers,models} directories of the plugin to the autoload path
|
||||||
Dir.glob File.expand_path(File.join(p.directory, 'app', '{controllers,helpers,models}')) do |dir|
|
Dir.glob File.expand_path(File.join(p.directory, 'app', '{controllers,helpers,models}')) do |dir|
|
||||||
ActiveSupport::Dependencies.autoload_paths += [dir]
|
ActiveSupport::Dependencies.autoload_paths += [dir]
|
||||||
Rails.application.config.eager_load_paths += [dir] if Rails.env == 'production'
|
Rails.application.config.eager_load_paths += [dir] if Rails.application.config.eager_load
|
||||||
end
|
end
|
||||||
|
|
||||||
# Defines plugin setting if present
|
# Defines plugin setting if present
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user