diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-08-21 14:01:22 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-09-16 12:42:19 +0100 |
commit | d65804b7d8d2138b4570b26449321e1a9bb847fb (patch) | |
tree | 80984cf9acfebecfac859d82e410f98bfaa7975d /app/controllers/request_controller.rb | |
parent | ebee053ec8514f70f94309f306bf1e82050c4c33 (diff) |
Remove hidden incoming messages from correspondence.txt
Adds a spec for what we want to see - no message text in
correspondence.txt, and no attachments. Refactors the
simple_correspondence templates to make it clearer that these are doing
the same job as the html.erb ones, for text.
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 5ca7c431d..86ee4552d 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -892,6 +892,7 @@ class RequestController < ApplicationController zipfile.get_output_stream(file_info[:filename]) { |f| f.puts(file_info[:data]) } for message in @info_request.incoming_messages + next unless message.user_can_view?(authenticated_user) attachments = message.get_attachments_for_display for attachment in attachments filename = "#{attachment.url_part_number}_#{attachment.display_filename}" @@ -967,7 +968,7 @@ class RequestController < ApplicationController end if !done file_info = { :filename => 'correspondence.txt', - :data => render_to_string(:template => 'request/simple_correspondence.html.erb', + :data => render_to_string(:template => 'request/show.text.erb', :layout => false) } end file_info |