diff options
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | app/models/outgoing_message.rb | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index f67c28770..2f666a318 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -19,7 +19,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.133 2008-08-22 04:09:52 francis Exp $ +# $Id: incoming_message.rb,v 1.134 2008-08-22 04:18:18 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel @@ -135,6 +135,8 @@ class IncomingMessage < ActiveRecord::Base has_many :outgoing_message_followups, :foreign_key => 'incoming_message_followup_id', :class_name => 'OutgoingMessage' + has_many :info_request_events # never really has many, but could in theory + # Some emails are large (10Mb), making things like search results and the # front page list of requests slow to display as the data is transferred from # the database. diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index f5bca3669..d13fa80b1 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.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: outgoing_message.rb,v 1.59 2008-08-20 23:56:21 francis Exp $ +# $Id: outgoing_message.rb,v 1.60 2008-08-22 04:18:18 francis Exp $ class OutgoingMessage < ActiveRecord::Base belongs_to :info_request @@ -32,6 +32,10 @@ class OutgoingMessage < ActiveRecord::Base belongs_to :incoming_message_followup, :foreign_key => 'incoming_message_followup_id', :class_name => 'IncomingMessage' + # can have many events, for items which were resent by site admin e.g. if + # contact address changed + has_many :info_request_events + # How the default letter starts and ends def get_salutation ret = "Dear " |