Reverse Polymorphic Associations

后端 未结 3 2027
北荒
北荒 2021-01-05 13:42

I have a parent object, Post, which has the following children.

has_one :link
has_one :picture
has_one :code

These children are mutually ex

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-05 14:21

    I wrote up a small Gist showing how to do this: https://gist.github.com/1242485

提交回复
热议问题