def css_include_tag(*stylesheets)
options = stylesheets.last.is_a?(Hash) ? stylesheets.pop : {}
return nil if stylesheets.empty?
if (bundle_name = options[:bundle]) && Merb::Assets.bundle? && stylesheets.size > 1
bundler = Merb::Assets::StylesheetAssetBundler.new(bundle_name, *stylesheets)
bundled_asset = bundler.bundle!
return css_include_tag(bundled_asset)
end
tags = ""
for stylesheet in stylesheets
attrs = {
:href => asset_path(:stylesheet, stylesheet),
:type => "text/css",
:rel => "Stylesheet",
:charset => options[:charset] || 'utf-8',
:media => options[:media] || :all
}
tags << %Q{<link #{attrs.to_xml_attributes} />}
end
return tags
end