Skip to content

Commit dc047f7

Browse files
committed
More railties CHANGELOG updates
1 parent 393b8bc commit dc047f7

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

railties/CHANGELOG.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
1-
* The setter `config.autoloader=` has been deleted. `zeitwerk` is the only available autoloading mode.
1+
* The setter `config.autoloader=` has been deleted. `zeitwerk` is the only
2+
available autoloading mode.
3+
4+
*Xavier Noria*
5+
6+
* `config.autoload_once_paths` can be configured in the body of the
7+
application class defined in `config/application.rb` or in the configuration
8+
for environments in `config/environments/*`.
9+
10+
Similarly, engines can configure that collection in the class body of the
11+
engine class or in the configuration for environments.
12+
13+
After that, the collection is frozen, and you can autoload from those paths.
14+
They are managed by the `Rails.autoloaders.once` autoloader, which does not
15+
reload, only autoloads/eager loads.
16+
17+
*Xavier Noria*
18+
19+
* During initialization, you cannot autoload reloadable classes or modules
20+
like application models, unless they are wrapped in a `to_prepare` block.
21+
For example, from `config/initializers/*`, or in application, engines, or
22+
railties initializers.
23+
24+
Please check the [autoloading
25+
guide](https://edgeguides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-when-the-application-boots)
26+
for details.
27+
28+
*Xavier Noria*
29+
30+
* While they are allowed to have elements in common, it is no longer required
31+
that `config.autoload_once_paths` is a subset of `config.autoload_paths`.
32+
The former are managed by the `once` autoloader. The `main` autoloader
33+
manages the latter minus the former.
234

335
*Xavier Noria*
436

0 commit comments

Comments
 (0)