aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/incoming_message.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 11d57d322..61edafaa2 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -303,6 +303,16 @@ class FOIAttachment
end
end
+ # Whether this type has a "View as HTML"
+ def has_body_as_html?
+ if self.content_type == 'application/vnd.ms-word'
+ return true
+ elsif self.content_type == 'application/pdf'
+ return true
+ end
+ return false
+ end
+
# For "View as HTML" of attachment
def body_as_html(dir)
html = nil
@@ -347,16 +357,6 @@ class FOIAttachment
return html
end
- # Whether this type has a "View as HTML"
- def has_body_as_html?
- if self.content_type == 'application/vnd.ms-word'
- return true
- elsif self.content_type == 'application/pdf'
- return true
- 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'