aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin_general_controller.rb7
-rw-r--r--app/controllers/admin_public_body_change_requests_controller.rb8
2 files changed, 6 insertions, 9 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index 753208c9a..f2414eeab 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -7,13 +7,6 @@
class AdminGeneralController < AdminController
def index
- # ensure we have a trailing slash
- current_uri = request.env['REQUEST_URI']
- if params[:suppress_redirect].nil? && !(current_uri =~ /\/$/)
- redirect_to admin_general_index_url + "/"
- return
- end
-
# Overview counts of things
@public_body_count = PublicBody.count
diff --git a/app/controllers/admin_public_body_change_requests_controller.rb b/app/controllers/admin_public_body_change_requests_controller.rb
index d76cdc0e5..6ff03a2bd 100644
--- a/app/controllers/admin_public_body_change_requests_controller.rb
+++ b/app/controllers/admin_public_body_change_requests_controller.rb
@@ -7,8 +7,12 @@ class AdminPublicBodyChangeRequestsController < AdminController
def update
@change_request = PublicBodyChangeRequest.find(params[:id])
@change_request.close!
- @change_request.send_response(params[:subject], params[:response])
- flash[:notice] = 'The change request has been closed and the user has been notified'
+ if params[:subject] && params[:response]
+ @change_request.send_response(params[:subject], params[:response])
+ flash[:notice] = 'The change request has been closed and the user has been notified'
+ else
+ flash[:notice] = 'The change request has been closed'
+ end
redirect_to admin_general_index_path
end