Permalink
Browse files

[Rails] Fixed a bug in asset hosts support when compiling outside the…

… context of a controller.
  • Loading branch information...
chriseppstein committed Jul 7, 2009
1 parent 8d938f3 commit 6b8bbd22b13ef4c329777913a633948e66e3da99
Showing with 4 additions and 11 deletions.
  1. +4 −11 lib/compass/sass_extensions/functions/urls.rb
@@ -18,7 +18,6 @@ def image_url(path)
path = path.value # get to the string value of the literal.
# Short curcuit if they have provided an absolute url.
if absolute_path?(path)
puts "#{path} is absolute"
return Sass::Script::String.new("url(#{path})")
end
@@ -44,7 +43,9 @@ def image_url(path)
end
# Compute the asset host unless in relative mode.
asset_host = (compute_asset_host(path) unless relative?)
asset_host = if !relative? && Compass.configuration.asset_host
Compass.configuration.asset_host.call(path)
end
# Compute and append the cache buster if there is one.
if buster = compute_cache_buster(path, real_path)
@@ -101,12 +102,4 @@ def default_cache_buster(path, real_path)
end
end
def compute_asset_host(path)
if Compass.configuration.asset_host
Compass.configuration.asset_host.call(path)
else
nil
end
end
end
end

0 comments on commit 6b8bbd2

Please sign in to comment.