aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/incoming_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r--app/models/incoming_message.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 43fec24c1..061469448 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.216 2009-09-08 23:48:29 francis Exp $
+# $Id: incoming_message.rb,v 1.217 2009-09-09 14:40:31 francis Exp $
# TODO
# Move some of the (e.g. quoting) functions here into rblib, as they feel
@@ -333,6 +333,15 @@ class FOIAttachment
end
return false
end
+
+ # Name of type of attachment type - only valid for things that has_body_as_html?
+ def name_of_content_type
+ if self.content_type == 'application/vnd.ms-word'
+ return "Word document"
+ elsif self.content_type == 'application/pdf'
+ return "PDF file"
+ end
+ end
end
class IncomingMessage < ActiveRecord::Base