smart_asset 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/smart_asset/helper.rb +3 -1
- data/lib/smart_asset/version.rb +1 -1
- metadata +2 -2
data/lib/smart_asset/helper.rb
CHANGED
|
@@ -9,8 +9,10 @@ class SmartAsset
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def stylesheet_link_merged(*stylesheets)
|
|
12
|
+
options = stylesheets.last.is_a?(::Hash) ? stylesheets.pop : {}
|
|
13
|
+
options[:media] ||= 'screen'
|
|
12
14
|
output = stylesheet_paths(*stylesheets).collect { |css|
|
|
13
|
-
"<link href=\"#{SmartAsset.prepend_asset_host css}\" media=\"
|
|
15
|
+
"<link href=\"#{SmartAsset.prepend_asset_host css}\" media=\"#{options[:media]}\" rel=\"Stylesheet\" type=\"text/css\" />"
|
|
14
16
|
}.join("\n")
|
|
15
17
|
defined?(Rails) && Rails.version[0..0] == '3' ? output.html_safe : output
|
|
16
18
|
end
|
data/lib/smart_asset/version.rb
CHANGED