headwayio / voyage

A Rails template with our standard defaults, ready to deploy to Heroku. **See readme in: lib/voyage/README.md**
https://headway.io/voyage
MIT License
0 stars 1 forks source link

Separate `Image` resource for holding attached files #51

Closed noahsettersten closed 6 years ago

noahsettersten commented 6 years ago

Shrine, as well as other file upload gems, recommend using a standalone, separate resource for cases where you want to attach multiple files to a single model.

In the case of Hypremium, we had products that could have any number of images associated with them. With this separate Image or Upload resource, the main model (Product here) would have many Image resources which would each have an associated image uploaded.

I'm not sure if this makes sense to have baked into Voyage, but I can see the need for multiple uploads in a number of circumstances.

noahsettersten commented 6 years ago

Create a separate Attachment model that doesn't use the processing for images.