method
expand_javascript_sources
expand_javascript_sources(sources, recursive = false)
private
Hide source
# File actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 635 def expand_javascript_sources(sources, recursive = false) if sources.include?(:all) all_javascript_files = collect_asset_files(JAVASCRIPTS_DIR, ('**' if recursive), '*.js') ((determine_source(:defaults, @@javascript_expansions).dup & all_javascript_files) + all_javascript_files).uniq else expanded_sources = sources.collect do |source| determine_source(source, @@javascript_expansions) end.flatten expanded_sources << "application" if sources.include?(:defaults) && File.exist?(File.join(JAVASCRIPTS_DIR, "application.js")) expanded_sources end end