Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
You can’t perform that action at this time.