Fields_for disappear when adding accepts_nested_attributes_for

前端 未结 1 458
走了就别回头了
走了就别回头了 2021-02-14 01:42

I\'m doing a nested form in Rails 3.2.5, but when I add the accepts_nested_attributes_for my fields_for disappear (they just stop showing in my form).<

相关标签:
1条回答
  • 2021-02-14 02:06

    In the controller new action call

    @product.varients.build
    

    That should create 1 in memory varient in the product varient collection and it should bind to the fields for

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