I’ve confused myself.
I have three objects: level, product, part. Together they classify a
- Replacing a part in a product has a level of difficulty associated
- The same part replaced in a different product has a different level
How can I model an association among these?
I have created a join model, “Repair class,” and connected all three
using :has_many through. However, this does not prevent multiple
records where the part and product stay the same, but the level
changes. In other words, I end up with multiple levels assigned to the
same part/product combination which does not happen in the real world.
What’s the best way to proceed?