From 30c28a76bfc12449be93a861fc7b1ae13f398f5c Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 6 Aug 2010 12:59:54 -0700 Subject: [PATCH] Update the rails version of image_url to match the new signature. --- lib/compass/app_integration/rails/actionpack2/urls.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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