From 7fba6028d8073a9124a6505aab9246b5b459db34 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 9 Jul 2009 12:49:18 -0700 Subject: [PATCH] [Rails] Fixed a bug in rails integration if the request is not set on the controller. --- lib/compass/app_integration/rails/urls.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compass/app_integration/rails/urls.rb b/lib/compass/app_integration/rails/urls.rb index 87f39508..f7eb3432 100644 --- a/lib/compass/app_integration/rails/urls.rb +++ b/lib/compass/app_integration/rails/urls.rb @@ -1,6 +1,6 @@ module Compass::SassExtensions::Functions::Urls def image_url_with_rails_integration(path) - if @controller = Sass::Plugin.rails_controller + if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request begin Sass::Script::String.new "url(#{image_path(path.value)})" ensure