From d0bbb66e73dd222824c23c2cc55735af4031fddc Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 28 Aug 2011 12:54:52 -0700 Subject: [PATCH] Add a generated-image-url helper for rails31 specifically --- lib/compass/app_integration/rails/actionpack31.rb | 2 +- lib/compass/app_integration/rails/actionpack31/helpers.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compass/app_integration/rails/actionpack31.rb b/lib/compass/app_integration/rails/actionpack31.rb index bbd2d531..5b894735 100644 --- a/lib/compass/app_integration/rails/actionpack31.rb +++ b/lib/compass/app_integration/rails/actionpack31.rb @@ -1,5 +1,5 @@ # TODO figure something out so image_path works with rails integration -%w(railtie).each do |lib| +%w(railtie helpers).each do |lib| require "compass/app_integration/rails/actionpack31/#{lib}" end diff --git a/lib/compass/app_integration/rails/actionpack31/helpers.rb b/lib/compass/app_integration/rails/actionpack31/helpers.rb index 3fcb825f..633620a3 100644 --- a/lib/compass/app_integration/rails/actionpack31/helpers.rb +++ b/lib/compass/app_integration/rails/actionpack31/helpers.rb @@ -1,5 +1,5 @@ module Sass::Script::Functions - def generated_image_url(path) - asset_url(path, "image") + def generated_image_url(path, only_path = nil) + asset_url(path, Sass::Script::String.new("image")) end end