How do you allow users make custom shopping lists?

I asked Ryan bates, the owner of if he knew of any
documentation that would explain what code to use to allow users make
their own lists in RoR. He referred me to here. I'm trying to make it
so user A can make a shopping list and populate it with items like
eggs, fruit, oatmeal, etc. I know that I could easily make one
shopping list for all users to use but my situation is different. I
want user A to be able to make a list for different types of food and
such. The problem is, I don't know if this is possible or how to do it
without other users seeing their shopping list. I'm very adamant on
letting users make their own shopping lists so any info on how to do
that is very much appreciated.

I'd start by creating various models to represent the user, the lists,
the items *in* the lists, and a pairing relationship between them (aka
a "join table", or in Rails lingo, a "has many through"
relationship). For example, you could have 4 models:

Foodable (the join model)

User has all the standard fields you need for a user with
authentication, etc. To handle authentication, do a Google search for
"authlogic" and do some reading on it.

ShoppingList consists only of:


(You could also add "notes" or something to that effect here too, if
you wanted.)

Finally, Food would simply be:


...that's it. So now you have: