diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-10-30 11:22:08 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-10-30 11:22:08 +0000 |
commit | 44a3f6c44ffe76b461444c4739f695e54eca6c56 (patch) | |
tree | 76e9053f7959f7f0ddc2eb3bb7233f2a8d5055bf /app/controllers | |
parent | 331ed724fb2f989510af6766a11e9ad2eac2fcf0 (diff) | |
parent | af1f0242ca7f19672725f8a60050902976c5f0a1 (diff) |
Merge branch 'issues/1457-close-change-request-without-email' into rails-3-develop
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin_general_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/admin_public_body_change_requests_controller.rb | 8 |
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 |