Looking through all the (quite good) tutorials on the Internet I could
not find a similar task - meaning a similar data structure.
Is there anybody who can give me an idea for the data model I shoud
I don’t have any experience with Rails that makes me find a proper
solution. Is there a way to define "Menu[1…n], Salad [1…m], Dessert
[1…i] for each day in an elegant way?
Honestly, one of the best ways for you to map out your data model is
to break down each element in your menu (assuming you have an existing
physical one) to get a clear picture. What does a Menu consist of?
What does a Menu Item consist? Are there different types of menu
items? Does each menu item have a name, description, and price?
Perhaps I helped you out a bit there, but that’s really the best place
to start. Don’t think about the technical relationships until you
answer those types of questions. While doing it, you’ll see that your
data model will evolve organically.
Another tip, start with the easiest thing to model, which my guess
would be the Menu itself (sans-menu items). You can have an empty Menu
with your catering business information to start (name of business,
address, etc…). Then think about what needs to go inside of it and
begin to evolve your data model over time. This is also how you might
consider developing the application. Build it in small pieces and
evolve it as you go. This is one of the things that Rails encourages
you to do.
Keep it simple!
Chief Evangelist, Partner
PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails