I have a parent table with an admin and superadmin field. The superadmin has the ability to assign other parents as admin or superadmin. I am looking to add checkboxes next to each parent in the list, where checking a box indicates that the parent is an admin or superadmin. If no boxes are checked, it means that the parent is neither an admin nor superadmin. How can a superadmin easily assign or remove a parent as an admin or superadmin by simply unchecking the checkbox? Please advise.
https://i.sstatic.net/YkMyg.png
Update
<td><%= check_box_tag 'admin', true, parent.admin, :onclick => 'this.form.submit()' %></td>
<td><%= check_box_tag 'superadmin', true, parent.superadmin, :onclick => 'this.form.submit()' %></td>
How can I uncheck the admin or superadmin checkbox to remove that parent as an admin or superadmin respectively?