I’m stuck on some associations that I think may be more complex than I
originally anticipated. Not really straightforward stuff for my first
Rails app so if you have a chance to point me in the right direction I
would really appreciate it!!
I have PurchaseItems, RecipeItems, and MenuItems.
PurchaseItems can be an Ingredient of RecipeItems and/or MenuItems.
RecipeItems can be an Ingredient of other RecipeItems and/or
I need to track additional Ingredient-specific attributes as well so
it seems that a has_many :through association is required. I can get
simple examples of this working just fine if I remove other parts of
the logic, but am just dying here trying to get it all to work
together. There is clearly self-referential associations at play here
also and (maybe??) polymorphic as well.
I would be completely thrilled if someone who has done this more than
once could help me out and illustrate the appropriate model
Thanks for your time!!