diff options
Diffstat (limited to 'app/models/foi_attachment.rb')
-rw-r--r-- | app/models/foi_attachment.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index 768e8d1d3..e73294f0f 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -63,22 +63,9 @@ class FoiAttachment < ActiveRecord::Base file.write d } update_display_size! - encode_cached_body! @cached_body = d end - # If the original mail part had a charset, it's some kind of string, so assume that - # it should be handled as a string in the stated charset, not a bytearray, and then - # convert it our default encoding. For ruby 1.8 this is a noop. - def encode_cached_body! - if RUBY_VERSION.to_f >= 1.9 - if charset - @cached_body.force_encoding(charset) - @cached_body = @cached_body.encode(Encoding.default_internal, charset) - end - end - end - def body if @cached_body.nil? tries = 0 @@ -99,7 +86,6 @@ class FoiAttachment < ActiveRecord::Base self.incoming_message.parse_raw_email!(force) retry end - encode_cached_body! end return @cached_body end |