lib/jammit/compressor.rb in jammit-0.2.3 vs lib/jammit/compressor.rb in jammit-0.2.4
- old
+ new
@@ -122,10 +122,10 @@
# Get the site-absolute public path for an image file path that may or may
# not be relative, given the path of the stylesheet that contains it.
def public_path(image_path, css_path)
image_path, css_path = Pathname.new(image_path), Pathname.new(css_path)
- (image_path.absolute? ? Pathname.new("public#{image_path}") : css_path.dirname + image_path).cleanpath
+ (image_path.absolute? ? Pathname.new("#{ASSET_ROOT}/public#{image_path}") : css_path.dirname + image_path).cleanpath
end
# An image is valid if it exists, and is less than 32K.
# IE does not support Data-URIs larger than 32K, and you probably shouldn't
# be embedding images that large in any case.