diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-23 01:53:38 -0700 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-23 01:53:38 -0700 |
commit | 8300398b9f4666c102d6c205f1b94e00b8017014 (patch) | |
tree | bfecc1ae98ff202e4063714c267afde0692f1ca7 /config/initializers/theme_loader.rb | |
parent | 20b2a3c493d19b1ea66ba2605053af05f0595f7f (diff) | |
parent | 820e124c20865c17eeea2e17c5bb82da620ada5b (diff) |
Merge pull request #493 from sebbacon/feature/merge-wombleton-sparkly-admin-css
Merge @wombleton sparkly admin css
Diffstat (limited to 'config/initializers/theme_loader.rb')
-rw-r--r-- | config/initializers/theme_loader.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/theme_loader.rb b/config/initializers/theme_loader.rb new file mode 100644 index 000000000..df392cc08 --- /dev/null +++ b/config/initializers/theme_loader.rb @@ -0,0 +1,7 @@ +theme_urls = MySociety::Config.get("THEME_URLS", []) +if ENV["RAILS_ENV"] != "test" # Don't let the theme interfere with Alaveteli specs + for url in theme_urls.reverse + theme_name = url.sub(/.*\/(.*).git/, "\\1") + require File.expand_path "../../../vendor/plugins/#{theme_name}/lib/alavetelitheme.rb", __FILE__ + end +end |