smart_asset 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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=\"screen\" rel=\"Stylesheet\" type=\"text/css\" />"
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
@@ -1,3 +1,3 @@
1
1
  class SmartAsset
2
- VERSION = "0.2.2" unless defined?(::SmartAsset::VERSION)
2
+ VERSION = "0.2.3" unless defined?(::SmartAsset::VERSION)
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Winton Welsh