From 37de6efc242e7c620174c2f5d738a719e15d8c7b Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 28 Nov 2011 08:05:26 -0800 Subject: [PATCH] Fix an issue with rails 2.x due to the image_url changing modules. --- lib/compass/app_integration/rails/actionpack2x/urls.rb | 4 ++-- lib/compass/app_integration/rails/runtime.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compass/app_integration/rails/actionpack2x/urls.rb b/lib/compass/app_integration/rails/actionpack2x/urls.rb index 9780f952..ae96d774 100644 --- a/lib/compass/app_integration/rails/actionpack2x/urls.rb +++ b/lib/compass/app_integration/rails/actionpack2x/urls.rb @@ -1,4 +1,4 @@ -module Compass::SassExtensions::Functions::Urls +module Compass::SassExtensions::Functions::Urls::ImageUrl def image_url_with_rails_integration(path, only_path = Sass::Script::Bool.new(false), cache_buster = Sass::Script::Bool.new(true)) if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request begin @@ -15,4 +15,4 @@ module Compass::SassExtensions::Functions::Urls end end alias_method_chain :image_url, :rails_integration -end \ No newline at end of file +end diff --git a/lib/compass/app_integration/rails/runtime.rb b/lib/compass/app_integration/rails/runtime.rb index 815fd29f..423a5eea 100644 --- a/lib/compass/app_integration/rails/runtime.rb +++ b/lib/compass/app_integration/rails/runtime.rb @@ -11,7 +11,7 @@ unless defined?(Compass::RAILS_LOADED) else require 'compass/app_integration/rails/actionpack2x' end - rescue LoadError, NameError - $stderr.puts "Compass could not access the rails environment." + rescue LoadError, NameError => e + $stderr.puts "Compass could not access the rails environment: #{e}" end end