【发布时间】:2011-01-15 07:33:50
【问题描述】:
在Railscast 154 之后,我已经与 cmets 和一些父资源建立了多态关联。例如
http://localhost:3000/articles/1/comments/1
http://localhost:3000/pictures/1/comments/1
这很好用,但我还需要为已经嵌套的资源设置 cmets,例如
http://localhost:3000/stories/1/chapters/1/comments/1
http://localhost:3000/forums/1/topics/1/comments/1
实现这一点的最佳方法是什么?
【问题讨论】:
-
@ShreyasSatish 什么答案?指向一个外部 URL 而不提示任何解释是一个答案。
标签: ruby-on-rails polymorphic-associations nested-resources