mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
autoloading guide, fix typo Amin
-> Admin
. [ci skip]
/cc @fxn
This commit is contained in:
parent
f46676d239
commit
0f54387d3c
1 changed files with 3 additions and 3 deletions
|
@ -459,7 +459,7 @@ Rails is not able to say if the trigger was a relative or qualified reference.
|
|||
For example, consider
|
||||
|
||||
```ruby
|
||||
module Amin
|
||||
module Admin
|
||||
User
|
||||
end
|
||||
```
|
||||
|
@ -490,7 +490,7 @@ and the `User` constant is already present in `Object`, it is not possible that
|
|||
the situation is
|
||||
|
||||
```ruby
|
||||
module Amin
|
||||
module Admin
|
||||
User
|
||||
end
|
||||
```
|
||||
|
@ -505,7 +505,7 @@ namespaces respectively and the constants that make the rule apply are known at
|
|||
that time.
|
||||
|
||||
But since autoloading happens on demand, if the top-level `User` by chance was
|
||||
not yet loaded then Rails has no way to know whether `Amin::User` should load it
|
||||
not yet loaded then Rails has no way to know whether `Admin::User` should load it
|
||||
or raise `NameError`.
|
||||
|
||||
These kind of name conflicts are rare in practice, but in case there's one
|
||||
|
|
Loading…
Reference in a new issue