Use Zeitwerk instead of the classic autoloader
In Rails 6.1, the classic autoloader is deprecated. We were getting an error because we were using `autoload` in the ActiveStorage plugin for CKEditor: expected file app/lib/ckeditor/backend/active_storage.rb to define constant Ckeditor::Backend::ActiveStorage So we're removing the line causing the error. Finally, we can now restore all the tests that that failed sometimes with the classic autoloader and that we modified in commits2af1fc72fand8ba37b295.
This commit is contained in:
@@ -32,10 +32,6 @@ module Consul
|
||||
# in any CONSUL DEMOCRACY installations
|
||||
config.active_support.use_authenticated_message_encryption = false
|
||||
|
||||
# Keep using the classic autoloader until we decide how custom classes
|
||||
# should work with zeitwerk
|
||||
config.autoloader = :classic
|
||||
|
||||
# Don't enable has_many_inversing because it doesn't seem to currently
|
||||
# work with the _count database columns we use for caching purposes
|
||||
config.active_record.has_many_inversing = false
|
||||
@@ -143,6 +139,7 @@ module Consul
|
||||
"app/models/custom/concerns"
|
||||
].each do |path|
|
||||
config.autoload_paths << Rails.root.join(path)
|
||||
config.eager_load_paths << Rails.root.join(path)
|
||||
end
|
||||
|
||||
config.paths["app/views"].unshift(Rails.root.join("app", "views", "custom"))
|
||||
|
||||
Reference in New Issue
Block a user