You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every element of `config.autoload_paths` should represent the top-level namespace (`Object`) and they cannot be nested in consequence (with the exception of `concerns` directories explained above).
322
+
323
+
To fix this, just remove the wildcards:
324
+
325
+
```ruby
326
+
config.autoload_paths <<"#{config.root}/lib"
327
+
```
328
+
329
+
New Features You Can Leverage
330
+
-----------------------------
331
+
332
+
### Delete `require_dependency` calls
315
333
316
334
All known use cases of `require_dependency` have been eliminated with Zeitwerk. You should grep the project and delete them.
317
335
318
336
If your application uses Single Table Inheritance, please see the [Single Table Inheritance section](autoloading_and_reloading_constants.html#single-table-inheritance) of the Autoloading and Reloading Constants (Zeitwerk Mode) guide.
319
337
320
338
321
-
Qualified Names in Class and Module Definitions Are Now Possible
Every element of `config.autoload_paths` should represent the top-level namespace (`Object`) and they cannot be nested in consequence (with the exception of `concerns` directories explained above).
378
-
379
-
To fix this, just remove the wildcards:
380
-
381
-
```ruby
382
-
config.autoload_paths <<"#{config.root}/lib"
383
-
```
384
-
385
-
386
-
Eager loading and autoloading are consistent
387
-
--------------------------------------------
382
+
### Eager Loading and Autoloading are Consistent
388
383
389
384
In `classic` mode, if `app/models/foo.rb` defines `Bar`, you won't be able to autoload that file, but eager loading will work because it loads files recursively blindly. This can be a source of errors if you test things first eager loading, execution may fail later autoloading.
0 commit comments