lib/galakei/docomo_css/inline_stylesheet.rb in galakei-0.11.3 vs lib/galakei/docomo_css/inline_stylesheet.rb in galakei-0.12.0
- old
+ new
@@ -20,9 +20,12 @@
def self.parser(href)
parser = CssParser::Parser.new
uri = URI.parse(href)
if uri.host && uri.scheme && uri.port
parser.load_uri!(uri)
+ elsif /^\/assets\/(.+)/=~ href
+ asset = Rails.application.assets.find_asset($1)
+ parser.add_block!(asset.to_s, {:media_types => :all, :base_dir => File.dirname(href)})
else
parser.load_file!(path(href))
end
return parser
end