Sha256: c8eb7107aec6495aa38c925dfb593af074a5cceb0dcac05ef3c05e80cd492908
Contents?: true
Size: 729 Bytes
Versions: 6
Compression:
Stored size: 729 Bytes
Contents
module CssSplitter module ApplicationHelper def split_stylesheet_link_tag(*sources) options = sources.extract_options! split_count = options.delete(:split_count) || 2 sources.map do |source| split_sources = (2..split_count).map { |index| "#{source}_split#{index}" } split_options = options.dup if Rails.env == 'development' && !split_options.key?(:debug) split_options[:debug] = false end split_sources << split_options [ stylesheet_link_tag(source, options), "<!--[if lte IE 9]>", stylesheet_link_tag(*split_sources), "<![endif]-->" ] end.flatten.join("\n").html_safe end end end
Version data entries
6 entries across 6 versions & 1 rubygems