Closed lakesare closed 8 years ago
I'll try to add something to the readme...
Basically if you have many variants with the same image just use the "products.images"
Use ImageGroups for something like shoes. Lets say you have 3 colors, and each color has 10 sizes. You would create 3 images groups (one for each color). The image for each size would be the same and hence point to the same image_group.
If you want an image for a specific ProductType you would need to model that out yourself.
Does that make sense?
Okay. Product has multiple variants and each of these variants belongs to some image group, that is, each variant can have multiple images associated with it. I can use these connections, or we can use product's :images if we don't have different images for product's variants. Did I get it right?
Sorry I should have confirmed your reply :( Hope all is working well
I can't wrap my head around how Image, ImageGroup, Variant and Product models are supposed to interact.
ImageGroup has_many :images and :variants, Product has_many :images. How is that supposed to operate? What does it mean for Image_group to have many :variants? image_group is a collection of :images. What does it mean for collection of :images to have many :variants? (My aim is to have one/multiple :images for one variant and I can't see how :image_groups belong here)