[Rails] Fixed a bug in rails integration if the request is not set on the controller.

This commit is contained in:
Chris Eppstein 2009-07-09 12:49:18 -07:00
parent b348fd7d3d
commit 7fba6028d8

View File

@ -1,6 +1,6 @@
module Compass::SassExtensions::Functions::Urls module Compass::SassExtensions::Functions::Urls
def image_url_with_rails_integration(path) 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 begin
Sass::Script::String.new "url(#{image_path(path.value)})" Sass::Script::String.new "url(#{image_path(path.value)})"
ensure ensure