Skip to content

Instantly share code, notes, and snippets.

@choonkeat
Created January 17, 2012 06:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choonkeat/1625207 to your computer and use it in GitHub Desktop.
Save choonkeat/1625207 to your computer and use it in GitHub Desktop.
Rendering SASS programatically in Rails 3 (with compass)
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