Module: ActionView::Helpers::AssetTagHelper

Defined in:
lib/patches/rails/asset_expansion_multiple_registrations.rb

Class Method Summary collapse

Class Method Details

.register_javascript_expansion(expansions) ⇒ Object


8
9
10
11
12
13
# File 'lib/patches/rails/asset_expansion_multiple_registrations.rb', line 8

def self.register_javascript_expansion(expansions)
  expansions.each do |key, values|
    @@javascript_expansions[key] ||= []
    @@javascript_expansions[key] += Array(values)
  end
end

.register_stylesheet_expansion(expansions) ⇒ Object


15
16
17
18
19
20
# File 'lib/patches/rails/asset_expansion_multiple_registrations.rb', line 15

def self.register_stylesheet_expansion(expansions)
  expansions.each do |key, values|
    @@stylesheet_expansions[key] ||= []
    @@stylesheet_expansions[key] += Array(values)
  end
end