diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-12-12 14:11:16 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-12-12 15:39:29 +1100 |
commit | 2f18efd75d79770941faa3c104dd6ca7a4e898b2 (patch) | |
tree | ceb3dfba91a0915b787179c6cc40704e17e8f4cf | |
parent | 0a5b470e28f67c191d962706cf5b1be039d770bf (diff) |
We don't need to specify the attribute again
Makes FoiAttachment model specs pass
-rw-r--r-- | app/models/incoming_message.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index a02d2456a..7729e04f4 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -631,7 +631,7 @@ class IncomingMessage < ActiveRecord::Base attachment_attributes = MailHandler.get_attachment_attributes(self.mail(force)) attachments = [] attachment_attributes.each do |attrs| - attachment = self.foi_attachments.find_or_create_by_hexdigest(:hexdigest => attrs[:hexdigest]) + attachment = self.foi_attachments.find_or_create_by_hexdigest(attrs[:hexdigest]) body = attrs.delete(:body) attachment.update_attributes(attrs) # Set the body separately as its handling can depend on the value of charset |