From 80f1597942dbfdc24d532d9ebd555969deea12fe Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 16 Aug 2006 09:18:17 +0000 Subject: Dependencies can autoload directories of nested classes. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/dependencies.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3