diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-02-10 16:16:13 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2016-02-10 16:16:13 -0800 |
commit | 0912579b1cc2832d4a389a5021d9dc6727d16f77 (patch) | |
tree | 057bbb8b6175b80c83e43efc6bf1f6475da6b1c3 /actionview | |
parent | 270e25ce851126c5a14cd51e97b0201aa8ac0b59 (diff) | |
parent | dfa0ab50f9d7357a670edb5178646176809f9e27 (diff) | |
download | rails-0912579b1cc2832d4a389a5021d9dc6727d16f77.tar.gz rails-0912579b1cc2832d4a389a5021d9dc6727d16f77.tar.bz2 rails-0912579b1cc2832d4a389a5021d9dc6727d16f77.zip |
Merge pull request #23604 from tenderlove/sort-templates
sort templates after looking them up in the from the paths cache
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/dependency_tracker.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/lib/action_view/dependency_tracker.rb b/actionview/lib/action_view/dependency_tracker.rb index fe98b370b7..7731773040 100644 --- a/actionview/lib/action_view/dependency_tracker.rb +++ b/actionview/lib/action_view/dependency_tracker.rb @@ -153,11 +153,11 @@ module ActionView def resolve_directories(wildcard_dependencies) return [] unless @view_paths - wildcard_dependencies.each_with_object([]) do |query, templates| - @view_paths.find_all_with_query(query).each do |template| - templates << "#{File.dirname(query)}/#{File.basename(template).split('.').first}" + wildcard_dependencies.flat_map { |query, templates| + @view_paths.find_all_with_query(query).map do |template| + "#{File.dirname(query)}/#{File.basename(template).split('.').first}" end - end + }.sort end def explicit_dependencies |