Skip to content
dturnbull edited this page Nov 30, 2010 · 2 revisions

Sass should be installed into your app normally. However, be aware that the Plugin will only create .css files when a controller is accessed. If you want Sass to create .css files when accessing just Googlyscript files, you can add middleware like so:

# Somewhere you configure the Sass plugin
Sass::Plugin.options[:template_location] = File.join(base_path, 'src', 'stylesheet')
Sass::Plugin.options[:css_location] = File.join(base_path, 'public', 'stylesheets')
Sass::Plugin.options[:cache_location] = File.join(base_path, 'tmp')
# Then you install the middleware
use Googly::Sass

This is the same as Sass::Plugin::Rack except it adds a dwell option. A patch has been submitted to and accepted by the Sass team.
Do not use Sass::Plugin::Rack unless you see it has the dwell option.

Clone this wiki locally