Skip to content

Commit 903656f

Browse files
authored
Merge pull request rails#40906 from abhaynikam/fix-typo-in-zeitwerk-guide
Fixes typos in Autoloading (Zeitwerk Mode) Guide [ci skip]
2 parents 71bc414 + 12ed0cd commit 903656f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/autoloading_and_reloading_constants.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ $PAYMENT_GATEWAY = Rails.env.production? ? RealGateway : MockedGateway
160160
# DO NOT DO THIS.
161161
```
162162

163-
The idea would be to use `$PAYMENT_GATEWAY` in the code, and let the initializer set that to the actual implementation dependending on the environment.
163+
The idea would be to use `$PAYMENT_GATEWAY` in the code, and let the initializer set that to the actual implementation depending on the environment.
164164

165165
On reload, `MockedGateway` is reloaded, but `$PAYMENT_GATEWAY` is not updated because initializers only run on boot. Therefore, it won't reflect the changes.
166166

@@ -403,7 +403,7 @@ class Admin::UsersController < ApplicationController
403403
end
404404
```
405405

406-
was not recommended because the resolution of constants inside their body was britle. You'd better write them in this style:
406+
was not recommended because the resolution of constants inside their body was brittle. You'd better write them in this style:
407407

408408
```ruby
409409
module Admin

0 commit comments

Comments
 (0)