You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/source/classic_to_zeitwerk_howto.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ All is good!
133
133
134
134
There can be additional output depending on the application configuration, but the last "All is good!" is what you are looking for.
135
135
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.
137
137
138
138
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.
139
139
@@ -147,7 +147,7 @@ Hold on, I am eager loading the application.
147
147
expected file app/models/vat.rb to define constant Vat
148
148
```
149
149
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?
151
151
152
152
### Acronyms
153
153
@@ -198,7 +198,7 @@ By default, `app/models/concerns` belongs to the autoload paths and therefore it
198
198
199
199
If your application uses `Concerns` as namespace, you have two options:
200
200
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.
202
202
2. Leave things as they are by removing `app/models/concerns` from the autoload paths:
203
203
204
204
```ruby
@@ -455,7 +455,7 @@ Delete any `require` Calls
455
455
456
456
In my experience, projects generally do not do this. But I've seen a couple, and have heard of a few others.
457
457
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).
0 commit comments