aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2016-02-10 16:16:13 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2016-02-10 16:16:13 -0800
commit0912579b1cc2832d4a389a5021d9dc6727d16f77 (patch)
tree057bbb8b6175b80c83e43efc6bf1f6475da6b1c3 /actionview
parent270e25ce851126c5a14cd51e97b0201aa8ac0b59 (diff)
parentdfa0ab50f9d7357a670edb5178646176809f9e27 (diff)
downloadrails-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.rb8
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