Fix an issue with rails 2.x due to the image_url changing modules.
This commit is contained in:
parent
79d94647f9
commit
37de6efc24
@ -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))
|
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
|
if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request
|
||||||
begin
|
begin
|
||||||
|
@ -11,7 +11,7 @@ unless defined?(Compass::RAILS_LOADED)
|
|||||||
else
|
else
|
||||||
require 'compass/app_integration/rails/actionpack2x'
|
require 'compass/app_integration/rails/actionpack2x'
|
||||||
end
|
end
|
||||||
rescue LoadError, NameError
|
rescue LoadError, NameError => e
|
||||||
$stderr.puts "Compass could not access the rails environment."
|
$stderr.puts "Compass could not access the rails environment: #{e}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user