Created
January 17, 2012 06:39
-
-
Save choonkeat/1625207 to your computer and use it in GitHub Desktop.
Rendering SASS programatically in Rails 3 (with compass)
This file contains 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
Rails.application.config.compass.line_comments = false | |
sass_compiler = Compass::Compiler.new(Rails.root, Compass.configuration.sass_path, Compass.configuration.css_path, sass: Compass.sass_engine_options) | |
engine = sass_compiler.engine(sass_filepath, File.join(Compass.configuration.css_path, "dummy.css")) | |
css_string = engine.render |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment