Flowdock
method

expand_javascript_sources

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActionView::Helpers::AssetTagHelper
expand_javascript_sources(sources) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 567
        def expand_javascript_sources(sources)
          if sources.include?(:all)
            all_javascript_files = Dir[File.join(JAVASCRIPTS_DIR, '*.js')].collect { |file| File.basename(file).gsub(/\.\w+$/, '') }.sort
            @@all_javascript_sources ||= ((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
Register or log in to add new notes.