aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index ccd9636d1..2295d6718 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -716,7 +716,10 @@ class RequestController < ApplicationController
@incoming_message.parse_raw_email!
@info_request = @incoming_message.info_request
if @incoming_message.info_request_id != params[:id].to_i
- message = "Incoming message %d does not belong to request %d" % [@incoming_message.info_request_id, params[:id]]
+ # Note that params[:id] might not be an integer, though
+ # if we’ve got this far then it must begin with an integer
+ # and that integer must be the id number of an actual request.
+ message = "Incoming message %d does not belong to request '%s'" % [@incoming_message.info_request_id, params[:id]]
raise ActiveRecord::RecordNotFound.new(message)
end
@part_number = params[:part].to_i