aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2013-03-03 16:35:35 +1100
committerHenare Degan <henare.degan@gmail.com>2013-03-03 16:35:35 +1100
commit4874d6b1af7dfc8b9815a8e03553a5a2d1e810e9 (patch)
tree765a438d227828a5efab40a085fee4ec8baa6c51
parentcddf28e2ff209f15302dc10ed41317b7499366d0 (diff)
We need to reload here in Rails 3.1 (caching?)
-rw-r--r--app/models/incoming_message.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index ae63e9db8..02d04b163 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -637,6 +637,9 @@ class IncomingMessage < ActiveRecord::Base
attachment.save!
attachments << attachment.id
end
+ # Reload to refresh newly created foi_attachments
+ self.reload
+
main_part = get_main_body_text_part
# we don't use get_main_body_text_internal, as we want to avoid charset
# conversions, since /usr/bin/uudecode needs to deal with those.