diff options
author | Carl Lerche <carllerche@mac.com> | 2009-05-26 12:14:50 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-05-26 12:14:50 -0700 |
commit | 09907d1b933d202333280fb2efc079f8bf969e16 (patch) | |
tree | 056d2f25b884660f7407147086a098d771ff16a6 /actionpack/lib/action_controller | |
parent | cbb0724f0d0d51a8097ba707517dcf1d09b07a31 (diff) | |
download | rails-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/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/abstract/renderer.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/new_base/compatibility.rb | 13 |
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 |