diff options
author | Robin Houston <robin@lenny.robin> | 2011-07-14 03:06:52 +0100 |
---|---|---|
committer | Robin Houston <robin@lenny.robin> | 2011-07-14 03:06:52 +0100 |
commit | ef95d5a730498bccd4dd19b0531e510c6c9461e0 (patch) | |
tree | 8d080f63adb38c93b1c8753e81f576236c224cac | |
parent | 0da365109e24050d4449967ccadd2a105615d758 (diff) |
1) You can’t call an instance method from a class method (d’oh)
2) The test coverage is less good than I imagined.
XXXX need test for zip file attachments
-rw-r--r-- | app/models/incoming_message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 0ad668afb..581c73f8b 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -1146,7 +1146,7 @@ class IncomingMessage < ActiveRecord::Base # recurse into zip files begin zip_file = Zip::ZipFile.open(tempfile.path) - text += _get_attachment_text_from_zip_file(zip_file) + text += IncomingMessage._get_attachment_text_from_zip_file(zip_file) zip_file.close() rescue $stderr.puts("Error processing zip file: #{$!.inspect}") @@ -1157,7 +1157,7 @@ class IncomingMessage < ActiveRecord::Base return text end - def _get_attachment_text_from_zip_file(zip_file) + def IncomingMessage._get_attachment_text_from_zip_file(zip_file) text = "" for entry in zip_file if entry.file? |