aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-03-04 12:36:45 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-03-04 12:36:45 +0000
commita7520990827da336e3585557e575eb58c3c430ec (patch)
tree77766f64625c8b4125a3efdd89ce15e24548e749 /actionpack/lib/action_view
parentf1e08b351d496ae71b48d86b46be1805486de823 (diff)
downloadrails-a7520990827da336e3585557e575eb58c3c430ec.tar.gz
rails-a7520990827da336e3585557e575eb58c3c430ec.tar.bz2
rails-a7520990827da336e3585557e575eb58c3c430ec.zip
Sort asset sources for consistent results across filesystems. Closes #7615.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index 9d98ebefdf..93e695ddbb 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -374,7 +374,7 @@ module ActionView
def expand_javascript_sources(sources)
case
when sources.include?(:all)
- all_javascript_files = Dir[File.join(JAVASCRIPTS_DIR, '*.js')].collect { |file| File.basename(file).split(".", 0).first }
+ all_javascript_files = Dir[File.join(JAVASCRIPTS_DIR, '*.js')].collect { |file| File.basename(file).split(".", 0).first }.sort
sources = ((@@javascript_default_sources.dup & all_javascript_files) + all_javascript_files).uniq
when sources.include?(:defaults)
@@ -391,7 +391,7 @@ module ActionView
def expand_stylesheet_sources(sources)
if sources.first == :all
- sources = Dir[File.join(STYLESHEETS_DIR, '*.css')].collect { |file| File.basename(file).split(".", 1).first }
+ sources = Dir[File.join(STYLESHEETS_DIR, '*.css')].collect { |file| File.basename(file).split(".", 1).first }.sort
else
sources
end