aboutsummaryrefslogtreecommitdiffstats
path: root/config/initializers
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-06-05 12:42:27 +0100
committerRobin Houston <robin.houston@gmail.com>2012-06-05 12:42:27 +0100
commit5310c55e01d42cebbe7ede9e9a42e8f4dacc90d9 (patch)
treeb77413f0f0b18dd68a0bb1a242b1ca9693ec12f7 /config/initializers
parent505fdbf99ee322aab2c753dc3215a263171c9463 (diff)
parent0b10c9002481d80d4a70ca224fc49aa5970c6294 (diff)
Merge branch 'wdtk' into develop
Diffstat (limited to 'config/initializers')
-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__