diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-19 14:16:52 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-19 14:16:52 +0000 |
commit | b2618cc78e86176c13e2b4197d56270242680884 (patch) | |
tree | 9842c9dd48cbf8a94a72fe360f4980463c27c991 /app/controllers/request_controller.rb | |
parent | 586c4ac00b67a4b5f1820c9bae6bfdf2392c0100 (diff) | |
parent | 69637c1a5978c38f3734495e14a2e8666502c54a (diff) |
Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtk
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 90c1f416d..aeb6d31fe 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -689,10 +689,11 @@ class RequestController < ApplicationController # Internal function def get_attachment_internal(html_conversion) @incoming_message = IncomingMessage.find(params[:incoming_message_id]) + @requested_request = InfoRequest.find(params[:id]) @incoming_message.parse_raw_email! @info_request = @incoming_message.info_request if @incoming_message.info_request_id != params[:id].to_i - raise sprintf("Incoming message %d does not belong to request %d", @incoming_message.info_request_id, params[:id]) + raise ActiveRecord::RecordNotFound.new("Incoming message %d does not belong to request %d", @incoming_message.info_request_id, params[:id]) end @part_number = params[:part].to_i @filename = params[:file_name].join("/") |