aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-02-26 17:49:09 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-02-26 17:49:09 +0000
commit26eaf073c4de8276663f927fdeeb91453e8b3956 (patch)
tree1690bbb49d971b063e240d155d58c503de938ee5 /actionpack/lib/action_controller
parentd11f8d551640c94e22c221c3bee39ab572b1dc72 (diff)
downloadrails-26eaf073c4de8276663f927fdeeb91453e8b3956.tar.gz
rails-26eaf073c4de8276663f927fdeeb91453e8b3956.tar.bz2
rails-26eaf073c4de8276663f927fdeeb91453e8b3956.zip
Remove ::Controllers related cruft; fix AP tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/base.rb2
-rw-r--r--actionpack/lib/action_controller/helpers.rb4
2 files changed, 2 insertions, 4 deletions
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