aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-02-01 12:01:21 +0000
committerRobin Houston <robin.houston@gmail.com>2012-02-01 12:01:21 +0000
commit8ce0205f1553f724f070544d275c7762f480efb3 (patch)
treee96fe8995b13a900c20b4110a81a4e8e06252502 /app/controllers/request_controller.rb
parent16f4b2da24d744dc7ed14199a220bf44b11fbcc9 (diff)
issue #351 redux
Corrected diagnosis, test & fix for issue #351. Fixes #351.
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