Created
October 13, 2010 05:22
-
-
Save rstacruz/623496 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Can't wait for Sinatra 1.1 for SCSS support? | |
| # Just `require` this in your bootstrapper, somewhere right | |
| # after require 'sinatra/base' or something. | |
| # More about SCSS in sass-lang.com. | |
| # lib/tilt_scss.rb | |
| module Tilt | |
| class ScssTemplate < SassTemplate | |
| private | |
| def sass_options | |
| super.merge(:syntax => :scss) | |
| end | |
| end | |
| register 'scss', ScssTemplate | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Main | |
| helpers do | |
| def scss(template, options={}, locals={}) | |
| options[:layout] = false | |
| options.merge!(:line_numbers => true, :debug_info => true, :always_check => true) if settings.development? | |
| render :scss, template, options, locals | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment