Skip to content

Commit 3033f92

Browse files
committed
Correct logic warning about initializers
Defining initializer 4 to run before itself and after 3 is possible, but not when the before constraint contradicts the after constraint via 2.
1 parent f250208 commit 3033f92

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
@@ -1553,7 +1553,7 @@ The `initializer` method takes three arguments with the first being the name for
15531553
15541554
Initializers defined using the `initializer` method will be run in the order they are defined in, with the exception of ones that use the `:before` or `:after` methods.
15551555
1556-
WARNING: You may put your initializer before or after any other initializer in the chain, as long as it is logical. Say you have 4 initializers called "one" through "four" (defined in that order) and you define "four" to go _before_ "four" but _after_ "three", that just isn't logical and Rails will not be able to determine your initializer order.
1556+
WARNING: You may put your initializer before or after any other initializer in the chain, as long as it is logical. Say you have 4 initializers called "one" through "four" (defined in that order) and you define "four" to go _before_ "two" but _after_ "three", that just isn't logical and Rails will not be able to determine your initializer order.
15571557

15581558
The block argument of the `initializer` method is the instance of the application itself, and so we can access the configuration on it by using the `config` method as done in the example.
15591559

0 commit comments

Comments
 (0)