FIX: deprecation warning - initialization autoloaded the constant (#12347)

Get rid of deprecation related to Zeitwerk autoloader.
This commit is contained in:
Krzysztof Kotlarek
2021-03-12 08:42:53 +11:00
committed by GitHub
parent b42ee6e296
commit 9a5a38a529
6 changed files with 163 additions and 150 deletions

View File

@ -55,6 +55,8 @@ require 'pry-rails' if Rails.env.development?
require 'discourse_fonts'
require_relative '../lib/zeitwerk_config.rb'
if defined?(Bundler)
bundler_groups = [:default]
@ -116,6 +118,7 @@ module Discourse
config.autoload_paths += Dir["#{config.root}/lib/validators/"]
Rails.autoloaders.main.ignore(Dir["#{config.root}/app/models/reports"])
Rails.autoloaders.main.ignore(Dir["#{config.root}/lib/freedom_patches"])
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.