aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-30 13:24:07 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-05-30 13:24:07 +0100
commitaef8f2598f100ca795091133b921cc9e9759cc39 (patch)
treecaeb831828e4745ed2a6b53476372d73ccfee96f
parent571bd7d9e3aa2102b24ed5a14e659e409e355d96 (diff)
Explicitly load monkeypatches etc with full path, so we can support multiple themes living side-by-side (or at least, support one theme overriding the behaviour of another in a predictable manner)
-rw-r--r--lib/alavetelitheme.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb
index 2ba63ce..b4f93a5 100644
--- a/lib/alavetelitheme.rb
+++ b/lib/alavetelitheme.rb
@@ -16,12 +16,9 @@ end
end
# Monkey patch app code
-require 'controller_patches.rb'
-require 'model_patches.rb'
-require 'patch_mailer_paths.rb'
-
-# Extend routes
-require 'config/custom-routes.rb'
-
-# Plug theme-specific locale strings
-require 'gettext_setup.rb'
+for patch in ['controller_patches.rb',
+ 'model_patches.rb',
+ 'config/custom-routes.rb',
+ 'gettext_setup.rb']
+ require File.expand_path "../#{patch}", __FILE__
+end