Skip to content

Instantly share code, notes, and snippets.

@squeejee
Created April 23, 2009 01:32
Show Gist options
  • Save squeejee/100218 to your computer and use it in GitHub Desktop.
Save squeejee/100218 to your computer and use it in GitHub Desktop.
# config/initializers/compass.rb
require 'compass'
location_hash = {
"#{RAILS_ROOT}/app/stylesheets" => "#{RAILS_ROOT}/public/stylesheets"
}
Theme.find_all.map(&:name).each do |theme|
location_hash["#{RAILS_ROOT}/themes/#{theme}/stylesheets"] = "#{RAILS_ROOT}/themes/#{theme}/stylesheets"
end
Sass::Plugin.options[:template_location] = location_hash
Compass::Frameworks::ALL.each do |framework|
Sass::Plugin.options[:template_location][framework.stylesheets_directory] = "#{RAILS_ROOT}/public/stylesheets"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment