Sha256: f374785a30adb06c94482fe44323f5d99d7efa03de6ba50e9cfcc64485b66f02

Contents?: true

Size: 703 Bytes

Versions: 8

Compression:

Stored size: 703 Bytes

Contents

# Allow to register javascript/stylesheet_expansions to existing symbols
#
# see https://rails.lighthouseapp.com/projects/8994/tickets/1975-allow-to-register-javascriptstylesheet_expansions-to-existing-symbols

require 'action_view/helpers/asset_tag_helper'

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
adva-core-0.0.9 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.8 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.7 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.6 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.5 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.4 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.2 lib/patches/rails/asset_expansion_multiple_registrations.rb
adva-core-0.0.1 lib/patches/rails/asset_expansion_multiple_registrations.rb