aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/info_request.rb10
-rw-r--r--app/models/request_mailer.rb5
2 files changed, 12 insertions, 3 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 707c0249f..630b3e5cf 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request.rb,v 1.51 2008-02-29 13:21:14 francis Exp $
+# $Id: info_request.rb,v 1.52 2008-02-29 16:00:29 francis Exp $
require 'digest/sha1'
@@ -100,6 +100,14 @@ public
return self.user.name + " <" + self.envelope_email + ">"
end
+ # Subject lines for emails about the request
+ def email_subject_request
+ 'Freedom of Information Request - ' + self.title
+ end
+ def email_subject_followup
+ 'Re: Freedom of Information Request - ' + self.title
+ end
+
# Return info request corresponding to an incoming email address, or nil if
# none found. Checks the hash to ensure the email came from the public body -
# only they are sent the email address with the has in it.
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb
index d4f85659b..494beba16 100644
--- a/app/models/request_mailer.rb
+++ b/app/models/request_mailer.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_mailer.rb,v 1.24 2008-02-27 13:59:52 francis Exp $
+# $Id: request_mailer.rb,v 1.25 2008-02-29 16:00:29 francis Exp $
class RequestMailer < ApplicationMailer
@@ -20,7 +20,7 @@ class RequestMailer < ApplicationMailer
headers 'Sender' => info_request.envelope_name_and_email,
'Reply-To' => @from
@recipients = info_request.recipient_name_and_email
- @subject = 'Freedom of Information Request - ' + info_request.title
+ @subject = info_request.email_subject_request
@body = {:info_request => info_request, :outgoing_message => outgoing_message,
:contact_email => MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost') }
end
@@ -36,6 +36,7 @@ class RequestMailer < ApplicationMailer
@recipients = incoming_message_followup.mail.from_addrs.to_s
end
@subject = 'Re: Freedom of Information Request - ' + info_request.title
+ @subject = info_request.email_subject_followup
@body = {:info_request => info_request, :outgoing_message => outgoing_message,
:incoming_message_followup => incoming_message_followup,
:contact_email => MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost') }