diff options
author | John Hawthorn <john@hawthorn.email> | 2018-09-12 18:21:18 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2018-09-12 18:22:09 -0700 |
commit | a33776b0f516e15b366f398d45e6959e8b8bcb73 (patch) | |
tree | b9a504a04114502afb20941a8b83bd41a9f4cacd /actionview/lib | |
parent | cc9a0de6602f3c33e5ffa168c75f90451b47a208 (diff) | |
download | rails-a33776b0f516e15b366f398d45e6959e8b8bcb73.tar.gz rails-a33776b0f516e15b366f398d45e6959e8b8bcb73.tar.bz2 rails-a33776b0f516e15b366f398d45e6959e8b8bcb73.zip |
Fix for variants: :any special case
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 301b28d9ea..db3cff71df 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -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 |