ActiveRecord :inverse_of does not work on has_many :through on the join model on create

前端 未结 1 822
Happy的楠姐
Happy的楠姐 2020-12-11 18:24

I can\'t get inverse_of to work on join models on creation. I\'m not sure if this is a bug or just not implemented as such. I have the following models:

<
相关标签:
1条回答
  • 2020-12-11 18:39

    As per the active record api 3.2.1: "Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it’s not a polymorphic."

    0 讨论(0)
提交回复
热议问题