aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-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