From 826f947ce7078a66e93276c8102dd235bb629911 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 11 Oct 2021 14:57:40 +0200 Subject: [PATCH] Fix typo in file name --- guides/source/classic_to_zeitwerk_howto.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/classic_to_zeitwerk_howto.md b/guides/source/classic_to_zeitwerk_howto.md index 26805556f4..e3d21ab5a6 100644 --- a/guides/source/classic_to_zeitwerk_howto.md +++ b/guides/source/classic_to_zeitwerk_howto.md @@ -132,7 +132,7 @@ VAT is an European tax. The file `app/models/vat.rb` defines `VAT` but the autol This is the most common kind of discrepancy you may find, it has to do with acronyms. Let's understand why do we get that error message. -The classic autoloader is able to autoload `VAT` because its input is the name of the missing constant, `VAT`, invokes `underscore` on it, which yields `vat`, and looks for a file called `var.rb`. It works. +The classic autoloader is able to autoload `VAT` because its input is the name of the missing constant, `VAT`, invokes `underscore` on it, which yields `vat`, and looks for a file called `vat.rb`. It works. The input of the new autoloader is the file system. Give the file `vat.rb`, Zeitwerk invokes `camelize` on `vat`, which yields `Vat`, and expects the file to define the constant `Vat`. That is what the error message says.