aboutsummaryrefslogtreecommitdiffstats
path: root/config/initializers/theme_loader.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-01-24 10:36:38 +0000
committerLouise Crow <louise.crow@gmail.com>2014-01-24 10:36:38 +0000
commit1445541f487fe22ec44b71607be3300319338d0a (patch)
tree5c9ed659c968f092317de6bab59a712e2584ca66 /config/initializers/theme_loader.rb
parent4eb8432dedc8b521086cdf163ebe5d373396d39a (diff)
parentb0a939a4d44077b4602176042ff4432b790561ad (diff)
Merge branch 'release/0.16'0.16
Diffstat (limited to 'config/initializers/theme_loader.rb')
-rw-r--r--config/initializers/theme_loader.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/initializers/theme_loader.rb b/config/initializers/theme_loader.rb
index b3ae11e1e..9c79e513c 100644
--- a/config/initializers/theme_loader.rb
+++ b/config/initializers/theme_loader.rb
@@ -3,7 +3,9 @@
$alaveteli_route_extensions = []
def require_theme(theme_name)
- theme_main_include = File.expand_path "../../../vendor/plugins/#{theme_name}/lib/alavetelitheme.rb", __FILE__
+ theme_lib = Rails.root.join 'lib', 'themes', theme_name, 'lib'
+ $LOAD_PATH.unshift theme_lib.to_s
+ theme_main_include = Rails.root.join theme_lib, "alavetelitheme.rb"
if File.exists? theme_main_include
require theme_main_include
end