aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_public_body_change_requests_controller.rb
blob: 6ff03a2bd7c58f555b2ac6cda998d3d628cfd3c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class AdminPublicBodyChangeRequestsController < AdminController

    def edit
        @change_request = PublicBodyChangeRequest.find(params[:id])
    end

    def update
        @change_request = PublicBodyChangeRequest.find(params[:id])
        @change_request.close!
        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

end