1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix for variants: :any special case

This commit is contained in:
John Hawthorn 2018-09-12 18:21:18 -07:00
parent cc9a0de660
commit a33776b0f5

View file

@ -387,7 +387,9 @@ module ActionView
# details.
match = filename.match(regex)
EXTENSIONS.keys.reverse.map do |ext|
if match[ext].nil?
if ext == :variants && details[ext] == :any
match[ext].nil? ? 0 : 1
elsif match[ext].nil?
# No match should be last
details[ext].length
else