1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 01:11:12 +00:00

Rails 5: "Page not found" error when accessing a page of a plugin in production mode (#26636).

Patch by Akiko Takano.

git-svn-id: http://svn.redmine.org/redmine/trunk@17293 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2018-04-08 13:45:27 +00:00
parent af2730de5e
commit 784b9f4aca

View File

@ -93,6 +93,7 @@ module Redmine #:nodoc:
# 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|
ActiveSupport::Dependencies.autoload_paths += [dir]
Rails.application.config.eager_load_paths += [dir] if Rails.env == 'production'
end
# Defines plugin setting if present