aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/testing/resolvers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/testing/resolvers.rb')
-rw-r--r--actionview/lib/action_view/testing/resolvers.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb
index a16dc0096e..1bedf44934 100644
--- a/actionview/lib/action_view/testing/resolvers.rb
+++ b/actionview/lib/action_view/testing/resolvers.rb
@@ -23,10 +23,10 @@ module ActionView #:nodoc:
private
- def query(path, exts, _, _, locals)
+ def query(path, exts, _, locals, cache:)
query = +""
- EXTENSIONS.each_key do |ext|
- query << "(" << exts[ext].map { |e| e && Regexp.escape(".#{e}") }.join("|") << "|)"
+ EXTENSIONS.each do |ext, prefix|
+ query << "(" << exts[ext].map { |e| e && Regexp.escape("#{prefix}#{e}") }.join("|") << "|)"
end
query = /^(#{Regexp.escape(path)})#{query}$/
@@ -47,7 +47,7 @@ module ActionView #:nodoc:
end
class NullResolver < PathResolver
- def query(path, exts, _, _, locals)
+ def query(path, exts, _, locals, cache:)
handler, format, variant = extract_handler_and_format_and_variant(path)
[ActionView::Template.new("Template generated by Null Resolver", path.virtual, handler, virtual_path: path.virtual, format: format, variant: variant, locals: locals)]
end