diff options
author | Edward Rudd <urkle@outoforder.cc> | 2017-09-20 13:00:01 -0400 |
---|---|---|
committer | Edward Rudd <urkle@outoforder.cc> | 2019-04-03 18:09:34 -0400 |
commit | c5efbbbccb8fabb25d95f6c5758225f31b3879ba (patch) | |
tree | 3e307cb17eb5a2833434260691a7dc47c55a9adf /actionview/lib/action_view | |
parent | 2ca056be6f38e20add62bc3d370ae06a8263318b (diff) | |
download | rails-c5efbbbccb8fabb25d95f6c5758225f31b3879ba.tar.gz rails-c5efbbbccb8fabb25d95f6c5758225f31b3879ba.tar.bz2 rails-c5efbbbccb8fabb25d95f6c5758225f31b3879ba.zip |
Fix checking for template variants when using the ActionView::FixtureResolver
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/testing/resolvers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 11ae9f731c..a97fb71b26 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -25,8 +25,8 @@ module ActionView #:nodoc: def query(path, exts, _, locals) 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}$/ |