summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-04-01 02:25:36 -0700
committerelijah <elijah@riseup.net>2016-04-01 02:25:36 -0700
commit97ace0f06ab72b82ed0be4ca5c481f4f16a3c847 (patch)
treeea4f0ca7087a0c668463c0cebff8825ac479fb3d /config
parentbe5efb57dc9b282a31cf29c9eac27cb5a7e7ac2f (diff)
api: added super simple motd, closes #7866
Diffstat (limited to 'config')
-rw-r--r--config/application.rb7
-rw-r--r--config/initializers/customization.rb3
2 files changed, 8 insertions, 2 deletions
diff --git a/config/application.rb b/config/application.rb
index 8555f48..b13c7d9 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -90,7 +90,12 @@ module LeapWeb
## CUSTOMIZATION
## see initializers/customization.rb
##
- config.paths['app/views'].unshift "config/customization/views"
+ if APP_CONFIG["customization_directory"]
+ custom_view_path = (Pathname.new(APP_CONFIG["customization_directory"]).relative_path_from(Rails.root) + 'views').to_s
+ else
+ custom_view_path = "config/customization/views"
+ end
+ config.paths['app/views'].unshift custom_view_path
# handle http errors ourselves
config.exceptions_app = self.routes
diff --git a/config/initializers/customization.rb b/config/initializers/customization.rb
index 76a2947..aaa2939 100644
--- a/config/initializers/customization.rb
+++ b/config/initializers/customization.rb
@@ -1,7 +1,8 @@
#
# When deploying, common customizations can be dropped in config/customizations. This initializer makes this work.
#
-customization_directory = "#{Rails.root}/config/customization"
+APP_CONFIG["customization_directory"] ||= "#{Rails.root}/config/customization"
+customization_directory = APP_CONFIG["customization_directory"]
#
# Set customization views as the first view path