diff options
author | francis <francis> | 2008-07-21 00:48:05 +0000 |
---|---|---|
committer | francis <francis> | 2008-07-21 00:48:05 +0000 |
commit | 6fc0f74f659f7854c000ef73f78141ade0836b03 (patch) | |
tree | de08f5bfd5c581ba374c48f7aaf96530540c6299 /app/models/info_request.rb | |
parent | 733f957e4845da7c5e4655a871ec305e469ebd09 (diff) |
Show date, and whether new email used, on resent bits.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index db14a9cf1..159663691 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -23,7 +23,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.123 2008-07-17 10:33:57 francis Exp $ +# $Id: info_request.rb,v 1.124 2008-07-21 00:48:05 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -550,6 +550,21 @@ public end end + # Get previous email sent to + def get_previous_email_sent_to(info_request_event) + last_email = nil + for e in self.info_request_events + if (e.event_type == 'sent' || e.event_type == 'resent') && e.outgoing_message_id == info_request_event.outgoing_message_id + if e.id == info_request_event.id + break + end + last_email = e.params[:email] + end + end + return last_email + end + + # Display version of status def display_status status = self.calculate_status |