diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-02-09 13:21:56 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-02-09 13:21:56 +0000 |
commit | 308707f1512fc43c570023ee786463d37e43f1fb (patch) | |
tree | ea7ebdaaf9988a8adfa91b8ff2b496a92a6624f9 /app/models/incoming_message.rb | |
parent | b1a683778e817005751ac08654d17366d4cda624 (diff) | |
parent | 46646f8e659dc3c567495424088eb66e6ef2feee (diff) |
Merge branch 'release/0.5.1'
Conflicts:
README.md
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r-- | app/models/incoming_message.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 131970ba6..cbbcf5aa6 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -57,7 +57,7 @@ class IncomingMessage < ActiveRecord::Base validates_presence_of :raw_email has_many :outgoing_message_followups, :foreign_key => 'incoming_message_followup_id', :class_name => 'OutgoingMessage' - has_many :foi_attachments + has_many :foi_attachments, :order => 'id' has_many :info_request_events # never really has many, but could in theory belongs_to :raw_email @@ -773,12 +773,12 @@ class IncomingMessage < ActiveRecord::Base # which is really messy. ensure_parts_counted attachments = [] - for leaf in leaves + for leaf in leaves body = leaf.body # As leaf.body causes MIME decoding which uses lots of RAM, do garbage collection here # to prevent excess memory use. XXX not really sure if this helps reduce # peak RAM use overall. Anyway, maybe there is something better to do than this. - GC.start + GC.start if leaf.within_rfc822_attachment within_rfc822_subject = leaf.within_rfc822_attachment.subject # Test to see if we are in the first part of the attached |