From 923479547b695da05a9004cdb499cbb9fceb6783 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 13 Jun 2016 10:15:51 -0500 Subject: [PATCH] Merge Sufia configuration with the CurationConcerns This reduces confusion over which configuration someone should be using. Fixes #2139 --- .../sufia/contact_form_controller_behavior.rb | 2 +- .../base/_form_progress.html.erb | 2 +- lib/generators/sufia/config_generator.rb | 1 + .../sufia/templates/config/sufia.rb | 19 +-- lib/sufia.rb | 5 +- lib/sufia/configuration.rb | 127 ++++++++++++++++++ lib/sufia/engine.rb | 37 +---- .../base/_form_progress.html.erb_spec.rb | 2 +- 8 files changed, 140 insertions(+), 55 deletions(-) create mode 100644 lib/sufia/configuration.rb diff --git a/app/controllers/concerns/sufia/contact_form_controller_behavior.rb b/app/controllers/concerns/sufia/contact_form_controller_behavior.rb index 790f51f05f..9b02a2f54a 100644 --- a/app/controllers/concerns/sufia/contact_form_controller_behavior.rb +++ b/app/controllers/concerns/sufia/contact_form_controller_behavior.rb @@ -23,7 +23,7 @@ def create end def after_deliver - return unless Sufia::Engine.config.enable_contact_form_delivery + return unless Sufia.config.enable_contact_form_delivery end end end diff --git a/app/views/curation_concerns/base/_form_progress.html.erb b/app/views/curation_concerns/base/_form_progress.html.erb index bdb8e1349f..faa92558b7 100644 --- a/app/views/curation_concerns/base/_form_progress.html.erb +++ b/app/views/curation_concerns/base/_form_progress.html.erb @@ -21,7 +21,7 @@ <% end %>