aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/incoming_message.rb
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2013-02-27 12:58:36 +1100
committerHenare Degan <henare.degan@gmail.com>2013-02-27 12:58:36 +1100
commit65247a15ab8d876d7fd60ccf6ef91e2487c166e5 (patch)
treeba5c9b4e6ab187c396e3cd41022a0cc47fa54953 /app/models/incoming_message.rb
parent835b51c1de0d49e652fe9c9a60f0974275de070c (diff)
Fix calculation of attachment sizes in Ruby 1.9.3
force_encoding is generally not a good idea and I can't see what it's trying to achieve here so... Revert "Use the character set of the attachment to encode the string that we're pulling out of the file before converting it to our default encoding." This reverts commit 3729f2053d4c04396d440a9c368bed174e9c9605.
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r--app/models/incoming_message.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 229d3bf24..f0367bbea 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -633,10 +633,7 @@ class IncomingMessage < ActiveRecord::Base
attachments = []
attachment_attributes.each do |attrs|
attachment = self.foi_attachments.find_or_create_by_hexdigest(attrs[:hexdigest])
- body = attrs.delete(:body)
attachment.update_attributes(attrs)
- # Set the body separately as its handling can depend on the value of charset
- attachment.body = body
attachment.save!
attachments << attachment.id
end