Project

General

Profile

Patch #30725 » plugin_eager_load.patch

Marius BĂLTEANU, 2019-01-31 12:14

View differences:

lib/redmine/plugin.rb
110 110
      # Adds the app/{controllers,helpers,models} directories of the plugin to the autoload path
111 111
      Dir.glob File.expand_path(File.join(p.directory, 'app', '{controllers,helpers,models}')) do |dir|
112 112
        ActiveSupport::Dependencies.autoload_paths += [dir]
113
        Rails.application.config.eager_load_paths += [dir] if Rails.env == 'production'
113
        Rails.application.config.eager_load_paths += [dir] if Rails.application.config.eager_load
114 114
      end
115 115

  
116 116
      # Defines plugin setting if present
    (1-1/1)