Unobtrusive dynamic form fields in Rails with jQuery

前端 未结 6 1066
情话喂你
情话喂你 2020-12-12 10:10

I\'m attempting to get over the hurdle of dynamic form fields in Rails -- this appears to be something the framework doesn\'t handle very gracefully. I\'m also using jQuery

6条回答
  •  一向
    一向 (楼主)
    2020-12-12 10:35

    I've successfully (and rather painlessly) used https://github.com/nathanvda/cocoon to dynamically generate my forms. Handles associations elegantly and the documentation is very straightforward. You can use it together with simple_form, too, which was particularly useful for me.

提交回复
热议问题