aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/incoming_message.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-10-28 18:23:31 +0000
committerfrancis <francis>2008-10-28 18:23:31 +0000
commita0c126caceb8b0b4a524b549914bcdee95ff8c7d (patch)
tree56282d8b59baae7f9db03f127b4cb7082d4090f3 /app/models/incoming_message.rb
parentfd61d6e1c05f60e472910a70dfe3ac103f99db97 (diff)
Show images properly
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r--app/models/incoming_message.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index ff2df09a3..a9434e233 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.159 2008-10-28 14:56:56 francis Exp $
+# $Id: incoming_message.rb,v 1.160 2008-10-28 18:23:31 francis Exp $
# TODO
# Move some of the (e.g. quoting) functions here into rblib, as they feel
@@ -162,9 +162,9 @@ class FOIAttachment
end
end
- def body_as_html
- tempfile = Tempfile.new('foiextract')
- tempfile.print body
+ def body_as_html(dir)
+ tempfile = Tempfile.new('foiextract', dir)
+ tempfile.print self.body
tempfile.flush
if content_type == 'application/vnd.ms-word'
@@ -181,6 +181,7 @@ class FOIAttachment
end
tempfile.close
+ tempfile.delete
return html
end