method
expand_javascript_sources
expand_javascript_sources(sources)
private
Hide source
# File actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 516 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 }.sort sources = ((@@javascript_default_sources.dup & all_javascript_files) + all_javascript_files).uniq when sources.include?(:defaults) sources = sources[0..(sources.index(:defaults))] + @@javascript_default_sources.dup + sources[(sources.index(:defaults) + 1)..sources.length] sources.delete(:defaults) sources << "application" if file_exist?(File.join(JAVASCRIPTS_DIR, "application.js")) end sources end