lib/rails-sass-images/sass/inline.rb in rails-sass-images-0.4 vs lib/rails-sass-images/sass/inline.rb in rails-sass-images-0.5

- old
+ new

@@ -10,11 +10,11 @@ # font-family: "MyFont" # src: inline("my.woff") format('woff') def inline(path) asset = RailsSassImages.asset(path) - mime = MIME::Types.type_for(asset.pathname.to_s).first.content_type - file = asset.pathname.read + mime = MIME::Types.type_for(asset.to_s).first.content_type + file = asset.read file = [file].flatten.pack('m').gsub("\n", '') Sass::Script::String.new("url('data:#{mime};base64,#{file}')") end end