diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/info_request_event.rb | 11 | ||||
-rw-r--r-- | app/models/request_mailer.rb | 5 |
2 files changed, 11 insertions, 5 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 706db9d20..9e4d8f6b9 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -15,14 +15,21 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request_event.rb,v 1.5 2008-01-10 01:13:28 francis Exp $ +# $Id: info_request_event.rb,v 1.6 2008-01-21 11:08:16 francis Exp $ class InfoRequestEvent < ActiveRecord::Base belongs_to :info_request validates_presence_of :info_request validates_presence_of :event_type - validates_inclusion_of :event_type, :in => ['sent', 'resent', 'followup_sent', 'followup_resent', 'edit_outgoing'] + validates_inclusion_of :event_type, :in => [ + 'sent', + 'resent', + 'followup_sent', + 'followup_resent', + 'edit_outgoing', # outgoing message edited in admin interface + 'manual' # you did something in the db by hand + ] # We store YAML version of parameters in the database def params=(params) diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index ea4d635f1..747d8ae46 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.18 2008-01-14 12:22:36 francis Exp $ +# $Id: request_mailer.rb,v 1.19 2008-01-21 11:08:16 francis Exp $ class RequestMailer < ApplicationMailer def initial_request(info_request, outgoing_message) @@ -19,12 +19,11 @@ class RequestMailer < ApplicationMailer def followup(info_request, outgoing_message, incoming_message_followup) @from = info_request.incoming_name_and_email headers 'Sender' => info_request.envelope_name_and_email - @recipients = incoming_message_followup.mail.from + @recipients = incoming_message_followup.mail.from_addrs.to_s @subject = 'Re: Freedom of Information Request - ' + info_request.title @body = {:info_request => info_request, :outgoing_message => outgoing_message, :incoming_message_followup => incoming_message_followup, :contact_email => MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost') } - end def bounced_message(email) |