aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_request_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-08-21 15:54:06 +0100
committerLouise Crow <louise.crow@gmail.com>2014-08-21 15:54:06 +0100
commit15bd831e007a9150c2a7cd6ba0efa9a125988e84 (patch)
tree820be1af6a497df93613a414374bd3cfd5a17e04 /app/controllers/admin_request_controller.rb
parent8623e1a42478d3d531cb137329d3bad9698d45b1 (diff)
parent69c700d1ff12bb798569e00f8bf91c539b0ae336 (diff)
Merge branch 'rails-3-develop' of ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
Diffstat (limited to 'app/controllers/admin_request_controller.rb')
-rw-r--r--app/controllers/admin_request_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb
index 5c45a6e6e..21120e4ad 100644
--- a/app/controllers/admin_request_controller.rb
+++ b/app/controllers/admin_request_controller.rb
@@ -100,7 +100,8 @@ class AdminRequestController < AdminController
@info_request.fully_destroy
# expire cached files
expire_for_request(@info_request)
- flash[:notice] = "Request #{url_title} has been completely destroyed. Email of user who made request: " + user.email
+ email = user.try(:email) ? user.email : 'This request is external so has no associated user'
+ flash[:notice] = "Request #{ url_title } has been completely destroyed. Email of user who made request: #{ email }"
redirect_to admin_request_list_url
end