Skip to content

Commit 7fba602

Browse files
committed
[Rails] Fixed a bug in rails integration if the request is not set on the controller.
1 parent b348fd7 commit 7fba602

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/compass/app_integration/rails

‎lib/compass/app_integration/rails/urls.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Compass::SassExtensions::Functions::Urls
22
def image_url_with_rails_integration(path)
3-
if @controller = Sass::Plugin.rails_controller
3+
if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request
44
begin
55
Sass::Script::String.new "url(#{image_path(path.value)})"
66
ensure

0 commit comments

Comments
 (0)