From 91a628ffa080901cc5ea4e9ec758eb0b8a786916 Mon Sep 17 00:00:00 2001 From: Tristan Harward Date: Fri, 31 May 2013 14:23:31 -0400 Subject: [PATCH] Use correct reference to context through the importer Fixes #366 in the correct way, hopefully. I can't cite my sources well, since Sprockets is very difficult to follow... but suffice to say the global options hash sent to the Tilt SASS template engine always has a reference to the Sprockets importer, and the importer always has a reference to the context. Tested with Sprockets 2.2.2 with and without Rails. --- lib/bootstrap-sass/compass_functions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootstrap-sass/compass_functions.rb b/lib/bootstrap-sass/compass_functions.rb index 8370fc19..b83d7356 100644 --- a/lib/bootstrap-sass/compass_functions.rb +++ b/lib/bootstrap-sass/compass_functions.rb @@ -18,7 +18,7 @@ module Sass::Script::Functions options[:sprockets][:context] else # Compatibility with sprockets pre 2.10.0 - options[:custom][:sprockets_context] + options[:importer].context end end end