aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_request_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin_request_controller.rb')
-rw-r--r--app/controllers/admin_request_controller.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb
index 6e7ebd1b8..3620b019c 100644
--- a/app/controllers/admin_request_controller.rb
+++ b/app/controllers/admin_request_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: admin_request_controller.rb,v 1.9 2008-04-11 15:53:57 francis Exp $
+# $Id: admin_request_controller.rb,v 1.10 2008-04-14 10:02:55 francis Exp $
class AdminRequestController < ApplicationController
layout "admin"
@@ -67,6 +67,18 @@ class AdminRequestController < ApplicationController
end
end
+ def fully_destroy
+ @info_request = InfoRequest.find(params[:id])
+
+ user = @info_request.user
+ url_title = @info_request.url_title
+
+ @info_request.fully_destroy
+
+ flash[:notice] = "Request #{url_title} has been completely destroyed. Email of user who made request: " + user.email
+ redirect_to admin_url('request/list')
+ end
+
def edit_outgoing
@outgoing_message = OutgoingMessage.find(params[:id])
end