Skip to content

Commit 633eb5a

Browse files
authored
Merge pull request rails#49676 from aitor/patch-1
Update classic_to_zeitwerk_howto.md [ci skip]
2 parents ae6fa7a + 4a3e51a commit 633eb5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guides/source/classic_to_zeitwerk_howto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ All is good!
133133

134134
There can be additional output depending on the application configuration, but the last "All is good!" is what you are looking for.
135135

136-
If the double-check explained in the previous section determined actually there have to be some custom autoload paths outside the eager load paths, the task will detect and warn about them. However, if the test suite loads those files successfully, you're good.
136+
If the double-check explained in the previous section determined that there have to be some custom autoload paths outside the eager load paths, the task will detect and warn about them. However, if the test suite loads those files successfully, you're good.
137137

138138
Now, if there's any file that does not define the expected constant, the task will tell you. It does so one file at a time, because if it moved on, the failure loading one file could cascade into other failures unrelated to the check we want to run and the error report would be confusing.
139139

@@ -147,7 +147,7 @@ Hold on, I am eager loading the application.
147147
expected file app/models/vat.rb to define constant Vat
148148
```
149149

150-
VAT is an European tax. The file `app/models/vat.rb` defines `VAT` but the autoloader expects `Vat`, why?
150+
VAT is a European tax. The file `app/models/vat.rb` defines `VAT` but the autoloader expects `Vat`, why?
151151

152152
### Acronyms
153153

@@ -198,7 +198,7 @@ By default, `app/models/concerns` belongs to the autoload paths and therefore it
198198

199199
If your application uses `Concerns` as namespace, you have two options:
200200

201-
1. Remove the `Concerns` namespace from those classes and modules and update client code.
201+
1. Remove the `Concerns` namespace from those classes and modules and update the client code.
202202
2. Leave things as they are by removing `app/models/concerns` from the autoload paths:
203203

204204
```ruby
@@ -455,7 +455,7 @@ Delete any `require` Calls
455455

456456
In my experience, projects generally do not do this. But I've seen a couple, and have heard of a few others.
457457

458-
In Rails application you use `require` exclusively to load code from `lib` or from 3rd party like gem dependencies or the standard library. **Never load autoloadable application code with `require`**. See why this was a bad idea already in `classic` [here](https://guides.rubyonrails.org/v6.1/autoloading_and_reloading_constants_classic_mode.html#autoloading-and-require).
458+
In a Rails application you use `require` exclusively to load code from `lib` or from 3rd party like gem dependencies or the standard library. **Never load autoloadable application code with `require`**. See why this was a bad idea already in `classic` [here](https://guides.rubyonrails.org/v6.1/autoloading_and_reloading_constants_classic_mode.html#autoloading-and-require).
459459

460460
```ruby
461461
require "nokogiri" # GOOD

0 commit comments

Comments
 (0)