Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Get controller/view_paths_test.rb to pass on new base

  • Loading branch information...
commit 09907d1b933d202333280fb2efc079f8bf969e16 1 parent cbb0724
Carl Lerche authored
View
4 actionpack/Rakefile
@@ -66,7 +66,6 @@ Rake::TestTask.new(:test_new_base_on_old_tests) do |t|
# * filters
# * integration
# * test
- # * view_paths
t.test_files = %w(
action_pack_assertions addresses_render assert_select
base benchmark caching capture content_type cookie dispatcher
@@ -74,7 +73,8 @@ Rake::TestTask.new(:test_new_base_on_old_tests) do |t|
http_digest_authentication layout logging mime_responds
record_identifier redirect render render_js render_json
render_other render_xml request_forgery_protection rescue
- resources routing selector send_file url_rewriter verification webservice
+ resources routing selector send_file url_rewriter
+ verification view_paths webservice
).map { |name| "test/controller/#{name}_test.rb" }
t.verbose = true
end
View
4 actionpack/lib/action_controller/abstract/renderer.rb
@@ -86,6 +86,10 @@ def append_view_path(path)
self.view_paths << path
end
+ def prepend_view_path(path)
+ self.view_paths.unshift(path)
+ end
+
def view_paths
self._view_paths
end
View
13 actionpack/lib/action_controller/new_base/compatibility.rb
@@ -116,5 +116,18 @@ def _layout_prefix(name)
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
Please sign in to comment.
Something went wrong with that request. Please try again.