diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-16 09:18:17 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-16 09:18:17 +0000 |
commit | 80f1597942dbfdc24d532d9ebd555969deea12fe (patch) | |
tree | 94cc323a37122822fc743ab6014e7eac82efdc44 /activesupport/lib/active_support | |
parent | bc7f2315ba89199bb24866ddb76ead4bbe6b71c9 (diff) | |
download | rails-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/active_support')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 6 |
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 |