Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# config/compass.rb
# Require any additional compass plugins here.
project_type = :rails
project_path = RAILS_ROOT if defined?(RAILS_ROOT)
css_dir = "public/stylesheets/compiled"
sass_dir = "app/stylesheets"
images_dir = "public/images"
javascripts_dir = "public/javascripts"
output_style = :compact
http_images_path = "/public/images"
# config/initializers/compass.rb
require 'compass'
Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
Compass.configuration.environment = RAILS_ENV.to_sym
Compass.configure_sass_plugin!
Theme.find_all.map(&:name).each do |theme|
# This will put the compiled css in the same location as the sass... :-(
Sass::Plugin.options[:template_location]["#{RAILS_ROOT}/themes/#{theme}/stylesheets"] = "#{RAILS_ROOT}/themes/#{theme}/stylesheets"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.