2015-04-07 45 views

回答

1

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

含有任何附件文件对象的数组。

所以,如果你有这样一个模型:

class Assessment 
    has_attached_file :file 
end 

你会简单地做,例如:

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