Nick Green wrote:
We have restaurants. Each restaurant has many menus. Each restaurant has many dishes. Every dish /must/ belong to a menu, and every dish /must/ belong to a restaurant (conceptually). The same dish cannot belong to 2 different menus or restaurants (a dish with all the same attributes could, but in the DB its a different dish).
I could be misreading your design specifications here, but it seems to me that restaurants would have many dishes through menus:
class Restaurant has_many :menus, :dependent => :destroy has_many :dishes, :through => :menus end
class Menu belongs_to :restaurant has_many :dishes, :dependent => :destroy end
class Dish belongs_to :menu end
Then you could do things like: restaurant.menus restaurant.dishes menu.dishes dish.menu.restaurant