Permalink
Browse files

replaced hardcoded themes paths

  • Loading branch information...
1 parent 629f709 commit 271bc97eab8fc0dbd84ae8e2394cbc7275fed118 CvX committed Nov 11, 2009
Showing with 8 additions and 1 deletion.
  1. +8 −1 config/environment.rb
View
@@ -64,4 +64,11 @@
require 'themes_loader'
Dir.glob("#{RAILS_ROOT}/lib/rboard/*") { |f| require f }
-Sass::Plugin.options[:template_location] = [[RAILS_ROOT + "/public/themes/blue", RAILS_ROOT + "/public/themes/blue"], [RAILS_ROOT + "/public/themes/dark", RAILS_ROOT + "/public/themes/dark"]] #TODO: enumerate actual public/themes directory contents
+require 'find'
+themes = []
+Find.find(RAILS_ROOT + "/public/themes") do |path|
+ themes << [path, path] if File.directory?(path)
+ Find.prune
+end
+
+Sass::Plugin.options[:template_location] = themes

0 comments on commit 271bc97

Please sign in to comment.