【发布时间】:2012-08-17 01:13:44
【问题描述】:
如何制作具有以下关联的项目表:
我的最终目标是能够创建包含许多组件和子食谱的食谱(我想将它们组合成一个下拉菜单)
Component
belongs_to sub_recipe
End
Sub_recipe
has_many components
belongs_to recipe
End
Recipe
has_many subrecipes
has_many components
End
【问题讨论】:
-
这个问题没有任何意义。你能解释一下你想做什么吗?
标签: ruby-on-rails model associations