开发者

Multiple attachments per model with paperclip

开发者 https://www.devze.com 2023-04-07 23:32 出处:网络
I\'m trying to integrate paperclip into a simple comment thread so users can attach files to their comments.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号