Skip to content

Commit 07bf01a

Browse files
authored
Merge pull request rails#53756 from Flixt/guide-configuring-correct-to-prepare-order
Correct documented order of `to_prepare` initialization event [ci skip]
2 parents 6695ac7 + 6df63a3 commit 07bf01a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/configuring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3762,7 +3762,7 @@ Rails has 5 initialization events which can be hooked into (listed in the order
37623762

37633763
* `before_initialize`: This is run directly before the initialization process of the application occurs with the `:bootstrap_hook` initializer near the beginning of the Rails initialization process.
37643764

3765-
* `to_prepare`: Run after the initializers are run for all Railties (including the application itself), but before eager loading and the middleware stack is built. More importantly, will run upon every code reload in `development`, but only once (during boot-up) in `production` and `test`.
3765+
* `to_prepare`: Run after the initializers are run for all Railties (including the application itself) and after the middleware stack is built, but before eager loading. More importantly, will run upon every code reload in `development`, but only once (during boot-up) in `production` and `test`.
37663766

37673767
* `before_eager_load`: This is run directly before eager loading occurs, which is the default behavior for the `production` environment and not for the `development` environment.
37683768

0 commit comments

Comments
 (0)