Rails 3 - Nested resources and polymorphic paths: OK to two levels, but break at three

后端 未结 3 1126
鱼传尺愫
鱼传尺愫 2021-02-04 15:00

I\'m trying to do a simple family reunion site with: \"posts\", \"families\", \"kids\", and \"pictures\". Ideally I\'d like the routes/relationships to be structured this way:<

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-04 15:48

    I can't speak for the polymorphic association problem (probably need more info on the actual error) but you are indeed headed in the right direction by defining your nested resources only one level deep. Here's a popular article by Jamis Buck that has become a reference and that you should probably check out.

提交回复
热议问题