On 23 March 2010 12:58, Andy <andy.bo...@gmail.com> wrote:
> Of course! Thanks very much or your replies, I really appreciate it.
>
> The app is an administrative tool, not a front end webstore. Sorry I
> wasn't more clear upfront, Sharagoz. The user will need to be able to
> create three types of items in the system via (nested model) forms:
> MenuItems, RecipeItems, and PurchaseItems. Ingredients are not a
> specific model that a user would have to interact with, as the
> RecipeItems and PurchaseItems are the Ingredients of other RecipeItems
> or MenuItems. I thought Ingredient would be an important object for
> the application as the name of the join model to link these items,
> however if another approach is recommended I am not hard set in this
> logic of course.
>
> The end result will be similar to many of the 'add task to project/add
> questions and answers to survey' nested model forms there are numerous
> tutorials for, but the associations just don't seem as
> straightforward.
>
> For a MenuItem form the user should be able to add and remove
> RecipeItems or PurchaseItems as Ingredients of the MenuItem (with
> details like quantity as well that are particular to the join).
>
> For a RecipeItem form the user should be able to add and remove
> RecipeItems or PurchaseItems as Ingredients of the RecipeItem (again,
> with details like quantity as well that are particular to the join).
>
> PurchaseItems only need to be created as they are at the bottom of the
> chain so to speak and don't contain other items.
>
> For example, Flour might be a purchaseitem, Pasta Dough might be a
> RecipeItem, and Spaghetti might be a Menuitem. Colin, the RecipeItems
> technically are the recipes you might say, as the ingredients are
> tacked to them and there will be fields for instructions in the
> RecipeItem model as well.

I still think you are starting off too deep in the implementation and
may not have got the basic models arranged optimally.  You have
described what you want your application wants to do  in computer
terms but still have not described the real-world situation that you
are modelling.

For example you say "the RecipeItems technically are the recipes you
might say, as the ingredients are tacked to them and there will be
fields for instructions in the RecipeItem model as well".  So in the
real world are there recipes?  If so what are their attributes?  Does
a recipe have Ingredients for example?

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to