From 26eaf073c4de8276663f927fdeeb91453e8b3956 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sun, 26 Feb 2006 17:49:09 +0000 Subject: Remove ::Controllers related cruft; fix AP tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 2 -- actionpack/lib/action_controller/helpers.rb | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 4551dd9f74..da27edd68c 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -324,8 +324,6 @@ module ActionController #:nodoc: unless @controller_path components = self.name.to_s.split('::') components[-1] = $1 if /^(.*)Controller$/ =~ components.last - # Accomodate the root Controllers module. - components.shift if components.first == 'Controllers' @controller_path = components.map { |name| name.underscore }.join('/') end diff --git a/actionpack/lib/action_controller/helpers.rb b/actionpack/lib/action_controller/helpers.rb index 19675605d4..e2d97b8fa0 100644 --- a/actionpack/lib/action_controller/helpers.rb +++ b/actionpack/lib/action_controller/helpers.rb @@ -109,7 +109,7 @@ module ActionController #:nodoc: private def default_helper_module! - module_name = name.sub(/^Controllers::/, '').sub(/Controller$|$/, 'Helper') + module_name = name.sub(/Controller$|$/, 'Helper') module_path = module_name.split('::').map { |m| m.underscore }.join('/') require_dependency module_path helper module_name.constantize @@ -128,7 +128,7 @@ module ActionController #:nodoc: rescue MissingSourceFile => e raise unless e.is_missing?("helpers/#{child.controller_path}_helper") end - end + end end end end -- cgit v1.2.3