aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorclaudiob <claudiob@gmail.com>2014-12-15 07:39:34 -0800
committerclaudiob <claudiob@gmail.com>2014-12-15 07:39:34 -0800
commitfec81049fe57bab6cca53b8c2d11bd668c0c9942 (patch)
tree68a932f68291f76e3efe0d93b8b058d6a663f54e /guides
parentc308fec0f543c5b5a95bf529b5885964ae8b0f61 (diff)
downloadrails-fec81049fe57bab6cca53b8c2d11bd668c0c9942.tar.gz
rails-fec81049fe57bab6cca53b8c2d11bd668c0c9942.tar.bz2
rails-fec81049fe57bab6cca53b8c2d11bd668c0c9942.zip
Fix minor typos in autoloading guide
[ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/constant_autoloading_and_reloading.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/constant_autoloading_and_reloading.md b/guides/source/constant_autoloading_and_reloading.md
index 88098236a0..33be1b6fb5 100644
--- a/guides/source/constant_autoloading_and_reloading.md
+++ b/guides/source/constant_autoloading_and_reloading.md
@@ -255,7 +255,7 @@ that may live in any other class or module object. If there were any, they
would have separate entries in their respective constant tables.
Put special attention in the previous paragraphs to the distinction between
-class and module objects, constant names, and value objects assiociated to them
+class and module objects, constant names, and value objects associated to them
in constant tables.
### Resolution Algorithm for Relative Constants
@@ -773,7 +773,7 @@ the code.
Autoloading keeps track of autoloaded constants. Reloading is implemented by
removing them all from their respective classes and modules using
`Module#remove_const`. That way, when the code goes on, those constants are
-going to be unkown again, and files reloaded on demand.
+going to be unknown again, and files reloaded on demand.
INFO. This is an all-or-nothing operation, Rails does not attempt to reload only
what changed since dependencies between classes makes that really tricky.
@@ -793,7 +793,7 @@ the boot process. But constant autoloading in Rails is **not** implemented with
One possible implementation based on `Module#autoload` would be to walk the
application tree and issue `autoload` calls that map existing file names to
-their conventional contant name.
+their conventional constant name.
There are a number of reasons that prevent Rails from using that implementation.
@@ -849,7 +849,7 @@ constant was missing and so it is not able to act as Ruby would. In particular,
if `Admin::User` is autoloadable, it will get autoloaded in either case.
Albeit qualified constants with `class` and `module` keywords may technically
-work with autoloading in some cases, it is preferrable to use relative constants
+work with autoloading in some cases, it is preferable to use relative constants
instead:
```ruby
@@ -1065,7 +1065,7 @@ way. Normally, though, such a call does not make sense in an initializer.
`require_dependency` provides a way to ensure a certain constant is defined at
some point regardless of the execution path, and one could think about doing
-some calls in an initialzer to make sure certain constants are loaded upfront,
+some calls in an initializer to make sure certain constants are loaded upfront,
for example as an attempt to address the gotcha with STIs.
Problem is, in development mode all autoloaded constants are wiped on a