mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 11:15:05 +08:00
FIX: deprecation warning - initialization autoloaded the constant (#12347)
Get rid of deprecation related to Zeitwerk autoloader.
This commit is contained in:

committed by
GitHub

parent
b42ee6e296
commit
9a5a38a529
@ -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.
|
||||
|
Reference in New Issue
Block a user