Commit 8dda9b2a authored by jplang's avatar jplang
Browse files

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

Patch by Akiko Takano.

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5624738b
......@@ -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(, 'app', '{controllers,helpers,models}')) do |dir|
ActiveSupport::Dependencies.autoload_paths += [dir]
Rails.application.config.eager_load_paths += [dir] if Rails.env == 'production'
# Defines plugin setting if present
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment