diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 7 | ||||
-rw-r--r-- | config/initializers/customization.rb | 3 |
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 |