aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/autoloading_and_reloading_constants.md
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2015-02-18 12:33:05 +0100
committerXavier Noria <fxn@hashref.com>2015-02-18 12:37:19 +0100
commit9814eb64275973abc66b1481b522c39b7083fff5 (patch)
tree6a1604d71aa1763400709278bfdc015bb83c311c /guides/source/autoloading_and_reloading_constants.md
parent07b659ca3f6945b5032690f38fdd0e080b842d37 (diff)
downloadrails-9814eb64275973abc66b1481b522c39b7083fff5.tar.gz
rails-9814eb64275973abc66b1481b522c39b7083fff5.tar.bz2
rails-9814eb64275973abc66b1481b522c39b7083fff5.zip
constants guide: adds a step to a resolution algorithm
Not sure how this one slipped, maybe deleted by accident while editing or something. Anyway, fixed.
Diffstat (limited to 'guides/source/autoloading_and_reloading_constants.md')
-rw-r--r--guides/source/autoloading_and_reloading_constants.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/source/autoloading_and_reloading_constants.md b/guides/source/autoloading_and_reloading_constants.md
index 8f9125f311..9e78eebf82 100644
--- a/guides/source/autoloading_and_reloading_constants.md
+++ b/guides/source/autoloading_and_reloading_constants.md
@@ -301,7 +301,9 @@ order. The ancestors of those elements are ignored.
2. If not found, then the algorithm walks up the ancestor chain of the cref.
-3. If not found, `const_missing` is invoked on the cref. The default
+3. If not found and the cref is a module, the constant is looked up in `Object`.
+
+4. If not found, `const_missing` is invoked on the cref. The default
implementation of `const_missing` raises `NameError`, but it can be overridden.
Rails autoloading **does not emulate this algorithm**, but its starting point is