specify how to configure zeitwerk by itself

there's also related docs further down in the doc

https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#how-to-use-the-classic-autoloader-in-rails-6
This commit is contained in:
John Bachir 2021-09-21 17:55:10 +01:00 committed by John Bachir
parent 9fb53e0673
commit 1a54c1871d

@ -603,6 +603,14 @@ config.load_defaults 6.0
enables `zeitwerk` autoloading mode on CRuby. In that mode, autoloading, reloading, and eager loading are managed by [Zeitwerk](https://github.com/fxn/zeitwerk).
If you are using defaults from a previous Rails version, you can enable zeitwerk like so:
```ruby
# config/application.rb
config.autoloader = :zeitwerk
```
#### Public API
In general, applications do not need to use the API of Zeitwerk directly. Rails sets things up according to the existing contract: `config.autoload_paths`, `config.cache_classes`, etc.