activeadmin: adding delete for a nested resource

前端 未结 6 1908
我在风中等你
我在风中等你 2021-02-12 10:42

I have a infrastructure object composed for many datacenters. In the apps/admin/infrastructures.rb I have the following code:

form do |f|
  f.inputs \"Infrastruc         


        
6条回答
  •  心在旅途
    2021-02-12 11:01

    This should work:

    datacenter_form.label :_delete
    datacenter_form.check_box :_delete
    

    This adds a checkbox for each nested object which will delete the object if checked.

提交回复
热议问题