aboutsummaryrefslogtreecommitdiffstats
path: root/app/mailers
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/outgoing_mailer.rb11
-rw-r--r--app/mailers/request_mailer.rb4
2 files changed, 8 insertions, 7 deletions
diff --git a/app/mailers/outgoing_mailer.rb b/app/mailers/outgoing_mailer.rb
index 797bf9fdd..19054b4e2 100644
--- a/app/mailers/outgoing_mailer.rb
+++ b/app/mailers/outgoing_mailer.rb
@@ -21,7 +21,7 @@ class OutgoingMailer < ApplicationMailer
mail(:from => info_request.incoming_name_and_email,
:to => info_request.recipient_name_and_email,
- :subject => info_request.email_subject_request)
+ :subject => info_request.email_subject_request(:html => false))
end
# Later message to public body regarding existing request
@@ -32,7 +32,7 @@ class OutgoingMailer < ApplicationMailer
mail(:from => info_request.incoming_name_and_email,
:to => OutgoingMailer.name_and_email_for_followup(info_request, incoming_message_followup),
- :subject => OutgoingMailer.subject_for_followup(info_request, outgoing_message))
+ :subject => OutgoingMailer.subject_for_followup(info_request, outgoing_message, :html => false))
end
# TODO: the condition checking valid_to_reply_to? also appears in views/request/_followup.html.erb,
@@ -67,11 +67,12 @@ class OutgoingMailer < ApplicationMailer
end
end
# Subject to use for followup
- def OutgoingMailer.subject_for_followup(info_request, outgoing_message)
+ def OutgoingMailer.subject_for_followup(info_request, outgoing_message, options = {})
if outgoing_message.what_doing == 'internal_review'
- return "Internal review of " + info_request.email_subject_request
+ return "Internal review of " + info_request.email_subject_request(:html => options[:html])
else
- return info_request.email_subject_followup(outgoing_message.incoming_message_followup)
+ return info_request.email_subject_followup(:incoming_message => outgoing_message.incoming_message_followup,
+ :html => options[:html])
end
end
# Whether we have a valid email address for a followup
diff --git a/app/mailers/request_mailer.rb b/app/mailers/request_mailer.rb
index 768257ba8..c9decc6db 100644
--- a/app/mailers/request_mailer.rb
+++ b/app/mailers/request_mailer.rb
@@ -20,7 +20,7 @@ class RequestMailer < ApplicationMailer
mail(:from => from_user.name_and_email,
:to => info_request.incoming_name_and_email,
- :subject => info_request.email_subject_followup)
+ :subject => info_request.email_subject_followup(:html => false))
end
# Used when a response is uploaded using the API
@@ -58,7 +58,7 @@ class RequestMailer < ApplicationMailer
user = set_by || info_request.user
@reported_by = user
@url = request_url(info_request)
- @admin_url = admin_request_show_url(info_request)
+ @admin_url = admin_request_url(info_request)
@info_request = info_request
@message = message