2015-04-07 44 views

回答

1

Griddler::Email具有attachments屬性,它是:

含有任何附件文件對象的數組。

所以,如果你有這樣一個模型:

class Assessment 
    has_attached_file :file 
end 

你會簡單地做,例如:

@email.attachments.each{|f| Attachment.create(file: f)}