Trouble with accepts_nested_attributes_for in Rails 5.0.0.beta3, -api option

后端 未结 5 1847
野性不改
野性不改 2021-01-04 19:28

I am using Rails 5.0.0.beta3, building an API-only app using the -app option on rails new, and I am having trouble with accepts_nested_attributes_for.

In my app, a

5条回答
  •  礼貌的吻别
    2021-01-04 19:39

    I found that adding the inverse_of options to the associations allowed accepts_nested_attributes to work. Nice than monkey patching, still allows the association to be validated

提交回复
热议问题