aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/abstract_controller/base.rb6
-rw-r--r--actionview/lib/action_view/test_case.rb2
2 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb
index e90886775e..d4317399ed 100644
--- a/actionpack/lib/abstract_controller/base.rb
+++ b/actionpack/lib/abstract_controller/base.rb
@@ -94,11 +94,7 @@ module AbstractController
# ==== Returns
# * <tt>String</tt>
def controller_path
- @controller_path ||= if anonymous?
- superclass.controller_path
- else
- name.sub(/Controller$/, ''.freeze).underscore
- end
+ @controller_path ||= name.sub(/Controller$/, ''.freeze).underscore unless anonymous?
end
# Refresh the cached action_methods when a new action_method is added.
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb
index ec16b0609e..120962b5aa 100644
--- a/actionview/lib/action_view/test_case.rb
+++ b/actionview/lib/action_view/test_case.rb
@@ -14,7 +14,7 @@ module ActionView
attr_accessor :request, :response, :params
class << self
- attr_accessor :controller_path
+ attr_writer :controller_path
end
def controller_path=(path)