From 97ace0f06ab72b82ed0be4ca5c481f4f16a3c847 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 1 Apr 2016 02:25:36 -0700 Subject: api: added super simple motd, closes #7866 --- config/application.rb | 7 ++++++- config/initializers/customization.rb | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'config') 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 -- cgit v1.2.3