diff --git a/lib/compass/app_integration/rails/actionpack2/urls.rb b/lib/compass/app_integration/rails/actionpack2/urls.rb index f7eb3432..1847a722 100644 --- a/lib/compass/app_integration/rails/actionpack2/urls.rb +++ b/lib/compass/app_integration/rails/actionpack2/urls.rb @@ -1,8 +1,12 @@ module Compass::SassExtensions::Functions::Urls - def image_url_with_rails_integration(path) + def image_url_with_rails_integration(path, only_path = Sass::Script::Bool.new(false)) if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request begin - Sass::Script::String.new "url(#{image_path(path.value)})" + if only_path.to_bool + Sass::Script::String.new image_path(path.value) + else + Sass::Script::String.new "url(#{image_path(path.value)})" + end ensure @controller = nil end