From a225ecc14774edad034b16ffe62a31e06ff0b98c Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Tue, 24 Jan 2012 10:29:17 +0000 Subject: Bug: we are causing a 500 when trying to raise 404 because the arguments to the exception constructor are wrong. --- app/controllers/request_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers/request_controller.rb') diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 0f980b43f..f8d4de22b 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -696,7 +696,8 @@ class RequestController < ApplicationController @incoming_message.parse_raw_email! @info_request = @incoming_message.info_request if @incoming_message.info_request_id != params[:id].to_i - raise ActiveRecord::RecordNotFound.new("Incoming message %d does not belong to request %d", @incoming_message.info_request_id, params[:id]) + message = "Incoming message %d does not belong to request %d" % [@incoming_message.info_request_id, params[:id]] + raise ActiveRecord::RecordNotFound.new(message) end @part_number = params[:part].to_i @filename = params[:file_name].join("/") -- cgit v1.2.3