aboutsummaryrefslogtreecommitdiffstats
path: root/config/initializers/theme_loader.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-06-12 09:20:43 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-06-12 09:20:43 +0100
commit54fc48b9b66ce29f660064fbea3e71ea15b61d58 (patch)
tree85269b9ef4f62bce2393134981edf30adf370b05 /config/initializers/theme_loader.rb
parentdc14834a5d85032645f3a410faae68089fb5fe1a (diff)
parent04653b52f2233c9b4fea6b690d16a825b974d36d (diff)
Merge branch 'release/0.6' of github.com:sebbacon/alaveteli into release/0.6
Diffstat (limited to 'config/initializers/theme_loader.rb')
-rw-r--r--config/initializers/theme_loader.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/initializers/theme_loader.rb b/config/initializers/theme_loader.rb
index 4ddce6910..8908dc07e 100644
--- a/config/initializers/theme_loader.rb
+++ b/config/initializers/theme_loader.rb
@@ -1,5 +1,9 @@
+# This is a global array of route extensions. Alaveteli modules may add to it.
+# It is used by our config/routes.rb to decide which route extension files to load.
+$alaveteli_route_extensions = []
+
theme_urls = MySociety::Config.get("THEME_URLS", [])
-if ENV["RAILS_ENV"] != "test" # Don't let the theme interfere with Alaveteli specs
+if ENV["RAILS_ENV"] != "test" # Don't let the themes interfere with Alaveteli specs
for url in theme_urls.reverse
theme_name = url.sub(/.*\/(.*).git/, "\\1")
theme_main_include = File.expand_path "../../../vendor/plugins/#{theme_name}/lib/alavetelitheme.rb", __FILE__