0
我的情景是,有几种不同的模型可以有评论。试图找出关系:评论belongs_to其中几个模型
Post
has_many :comments
Update
has_many :comments
Comment
belongs_to EITHER :post OR :update (but not both)????
什么是建立评论关系的正确方法?我希望能够调用Post.comments
和Update.comments
+1像往常一样:-)谢谢你链接到费曼系列顺便说一句! – Tilo
@Tilo:谢谢,RPF是我的英雄,[Sagan系列](http://www.youtube.com/watch?v=oY59wZdCDo0)也值得一试。 –
斑点 - 正是它看起来像什么多态性创建 – brittohalloran