diff options
author | Francis Irving <francis@mysociety.org> | 2010-02-06 03:04:25 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-02-06 03:04:25 +0000 |
commit | ad5b58c3472f6e1564ecbc16c324f058c0d9fa2a (patch) | |
tree | ce0958dadf7ff0fca0ee9828ffc9309c7f446db4 | |
parent | 40dad70cb9c66912ce29d4c6764cb39eb58f79df (diff) |
Move test function to more obvious place above implementation one
-rw-r--r-- | app/models/incoming_message.rb | 20 |
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' |