aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-08-27 16:13:02 +0100
committerLouise Crow <louise.crow@gmail.com>2013-09-16 14:03:23 +0100
commitbc743d9fc8c8f740f37b91cbe374c6ae20b10619 (patch)
treecc6608daf4ad6bc8d2e0c17c2436d6976694e2c5 /app/controllers/request_controller.rb
parent7cf64ac6665c8349c8b31120d6e22b800b99c3ab (diff)
Add public criteria for message event access methods
get_last_response_event and get_last_outgoing_event are used in various places to determine which events to link to, use in queries etc. Restrict them to refer to the last publicly visible event of the relevant type, and rename them to make that clear.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index a09939509..ac92801b9 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -919,7 +919,7 @@ class RequestController < ApplicationController
@last_info_request_event_id = info_request.last_event_id_needing_description
@new_responses_count = info_request.events_needing_description.select {|i| i.event_type == 'response'}.size
# For send followup link at bottom
- @last_response = info_request.get_last_response
+ @last_response = info_request.get_last_public_response
end
def make_request_zip(info_request, file_path)