aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-16 09:18:17 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-16 09:18:17 +0000
commit80f1597942dbfdc24d532d9ebd555969deea12fe (patch)
tree94cc323a37122822fc743ab6014e7eac82efdc44 /activesupport/lib
parentbc7f2315ba89199bb24866ddb76ead4bbe6b71c9 (diff)
downloadrails-80f1597942dbfdc24d532d9ebd555969deea12fe.tar.gz
rails-80f1597942dbfdc24d532d9ebd555969deea12fe.tar.bz2
rails-80f1597942dbfdc24d532d9ebd555969deea12fe.zip
Dependencies can autoload directories of nested classes.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 333532ee01..6241a822a4 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -282,7 +282,11 @@ class Class
super
else
begin
- parent.send :const_missing, class_id
+ begin
+ Dependencies.load_missing_constant self, class_id
+ rescue NameError
+ parent.send :const_missing, class_id
+ end
rescue NameError => e
# Make sure that the name we are missing is the one that caused the error
parent_qualified_name = Dependencies.qualified_name_for parent, class_id