Update the rails version of image_url to match the new signature.
This commit is contained in:
parent
813c817eb2
commit
30c28a76bf
@ -1,8 +1,12 @@
|
||||
module Compass::SassExtensions::Functions::Urls
|
||||
def image_url_with_rails_integration(path)
|
||||
def image_url_with_rails_integration(path, only_path = Sass::Script::Bool.new(false))
|
||||
if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request
|
||||
begin
|
||||
Sass::Script::String.new "url(#{image_path(path.value)})"
|
||||
if only_path.to_bool
|
||||
Sass::Script::String.new image_path(path.value)
|
||||
else
|
||||
Sass::Script::String.new "url(#{image_path(path.value)})"
|
||||
end
|
||||
ensure
|
||||
@controller = nil
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user