views:

19

answers:

1

Here is my case:

I have 3 menus (vietnamese, chinese, japanese) that each contains 10 dishes.

I wonder how should i route these to produce one page per menu with its dishes.

So that I in the view can have 3 links in the frontpage view, one for each menu.

Right now it looks like this:

resources :menus

But then the index view would show ALL menus with all dishes.

I find RESTful very hard to understand in rails.

Would be glad for any help!

+1  A: 

So /menus (index) will just show the list of all menus.

Then

  • /menus/1 could show Vietnamese
  • /menus/2 could show Chinese
  • /menus/3 could show Japanese

the /menus/id is the show action

Jesse Wolgamott