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 commits 2af1fc72f
and 8ba37b295.
This commit is contained in:
Javi Martín
2023-07-25 04:46:53 +02:00
parent 004684efe6
commit 5f24ee9121
6 changed files with 33 additions and 42 deletions

View File

@@ -72,6 +72,7 @@ Rails.application.configure do
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
config.eager_load_paths << "#{Rails.root}/spec/mailers/previews"
config.action_mailer.preview_path = "#{Rails.root}/spec/mailers/previews"
# Limit size of local logs