Multiple attachments per model with paperclip
I'm trying to integrate paperclip into a simple comment thread so users can attach files to their comments.
I understand that following the instructions that 开发者_如何学JAVAcome with paperclip will end up with me being able to attach one file to one comment.
I would like to be able to attach multiple files. Do I need to create a separate 'Attachments' model with a has_many relationship?
Creating a separate attachment model linked by a has_many
relationship is the best way to go.
精彩评论