aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGenadi Samokovarov <gsamokovarov@gmail.com>2014-09-22 21:44:48 +0200
committerGenadi Samokovarov <gsamokovarov@gmail.com>2014-09-22 21:44:48 +0200
commit7a191ffe44b9a0f08489b95cfb58f18ac8c641d6 (patch)
treee2f0b0673bd67c2b7c10f5defa36d3476d406b0f
parent53a8a7f9cb7ee93513c445302f25643423fea8e7 (diff)
downloadrails-7a191ffe44b9a0f08489b95cfb58f18ac8c641d6.tar.gz
rails-7a191ffe44b9a0f08489b95cfb58f18ac8c641d6.tar.bz2
rails-7a191ffe44b9a0f08489b95cfb58f18ac8c641d6.zip
Fix improper value types used to instantiate a Template in AV::NullResolver
While trying to provide a reproducible test for #17008 I stumbled on this one. Seems to be quite an old piece of code, but its definitely useful in situations like the reproducible test cases like the one above.
-rw-r--r--actionview/lib/action_view/testing/resolvers.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb
index dfb7d463b4..63a60542d4 100644
--- a/actionview/lib/action_view/testing/resolvers.rb
+++ b/actionview/lib/action_view/testing/resolvers.rb
@@ -46,9 +46,8 @@ module ActionView #:nodoc:
class NullResolver < PathResolver
def query(path, exts, formats)
handler, format, variant = extract_handler_and_format_and_variant(path, formats)
- [ActionView::Template.new("Template generated by Null Resolver", path, handler, :virtual_path => path, :format => format, :variant => variant)]
+ [ActionView::Template.new("Template generated by Null Resolver", path.virtual, handler, :virtual_path => path.virtual, :format => format, :variant => variant)]
end
end
-
end