aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-05-26 12:14:50 -0700
committerCarl Lerche <carllerche@mac.com>2009-05-26 12:14:50 -0700
commit09907d1b933d202333280fb2efc079f8bf969e16 (patch)
tree056d2f25b884660f7407147086a098d771ff16a6 /actionpack/lib
parentcbb0724f0d0d51a8097ba707517dcf1d09b07a31 (diff)
downloadrails-09907d1b933d202333280fb2efc079f8bf969e16.tar.gz
rails-09907d1b933d202333280fb2efc079f8bf969e16.tar.bz2
rails-09907d1b933d202333280fb2efc079f8bf969e16.zip
Get controller/view_paths_test.rb to pass on new base
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/abstract/renderer.rb4
-rw-r--r--actionpack/lib/action_controller/new_base/compatibility.rb13
2 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/abstract/renderer.rb b/actionpack/lib/action_controller/abstract/renderer.rb
index d7c68549e1..7f7ec78054 100644
--- a/actionpack/lib/action_controller/abstract/renderer.rb
+++ b/actionpack/lib/action_controller/abstract/renderer.rb
@@ -86,6 +86,10 @@ module AbstractController
self.view_paths << path
end
+ def prepend_view_path(path)
+ self.view_paths.unshift(path)
+ end
+
def view_paths
self._view_paths
end
diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb
index 646e69843e..fddfadcbf2 100644
--- a/actionpack/lib/action_controller/new_base/compatibility.rb
+++ b/actionpack/lib/action_controller/new_base/compatibility.rb
@@ -116,5 +116,18 @@ module ActionController
def performed?
response_body
end
+
+ # ==== Request only view path switching ====
+ def append_view_path(path)
+ view_paths.push(*path)
+ end
+
+ def prepend_view_path(path)
+ view_paths.unshift(*path)
+ end
+
+ def view_paths
+ _action_view.view_paths
+ end
end
end