Changeset 4910
- Timestamp:
- 09/02/06 21:13:30 (2 years ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/dependencies.rb (modified) (2 diffs)
- trunk/activesupport/test/dependencies_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r4900 r4910 1 1 *SVN* 2 3 * Add ApplicationController special case to Dependencies. [Nicholas Seckar] 2 4 3 5 * Don't pad remaining places with in_groups_of if specified padding value is false. [Marcel Molina Jr.] trunk/activesupport/lib/active_support/dependencies.rb
r4885 r4910 124 124 path = $1 if path =~ /\A(.*)\.rb\Z/ 125 125 expanded_path = File.expand_path(path) 126 126 127 bases.collect do |root| 127 128 expanded_root = File.expand_path root … … 132 133 next if nesting.blank? 133 134 134 nesting.camelize 135 end.compact.uniq 135 names = [nesting.camelize] 136 137 # Special case: application.rb might define ApplicationControlller. 138 names << 'ApplicationController' if nesting == 'application' 139 140 names 141 end.flatten.compact.uniq 136 142 end 137 143 trunk/activesupport/test/dependencies_test.rb
r4837 r4910 405 405 assert ! Dependencies.autoloaded?(ModuleFolder) 406 406 407 ModuleFolder::NestedClass407 1 if ModuleFolder::NestedClass # 1 if to avoid warning 408 408 assert ! Dependencies.autoloaded?(ModuleFolder::NestedClass) 409 409 end … … 413 413 end 414 414 415 def test_application_should_special_case_application_controller 416 with_loading 'autoloading_fixtures' do 417 require_dependency 'application' 418 assert_equal 10, ApplicationController 419 assert Dependencies.autoloaded?(:ApplicationController) 420 end 421 end 422 415 423 end