diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zorglub/engines/sass.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/zorglub/engines/sass.rb b/lib/zorglub/engines/sass.rb index 44973d5..447be02 100644 --- a/lib/zorglub/engines/sass.rb +++ b/lib/zorglub/engines/sass.rb @@ -4,10 +4,11 @@ module Zorglub module Engines module Sass def self.proc(path, obj) - sass = ::Sass::Engine.new(::File.read(path), obj.app.opt(:sass_options)) if obj.app.opt(:engines_cache_enabled) key = path.sub obj.app.opt(:root), '' - obj.app.engines_cache[key] ||= sass + sass = obj.app.engines_cache[key] || ::Sass::Engine.new(::File.read(path), obj.app.opt(:sass_options)) + else + sass = ::Sass::Engine.new(::File.read(path), obj.app.opt(:sass_options)) end css = sass.render [css, 'text/css'] |