I need to toggle boolean value through one checkbox
Right now I have two checkboxes one set to true and the other set to false
When someone clicks on wither button it set an event on the submit button to submit the new value.
<%= form_with(model: @project, local: true) do |form| %>
<div>
<div id="info_false">
<%= label :access_rights, "Pending", value: false %>
<%= form.radio_button :build_one, false, :checked => true, :value => false, id: "build_one_1" %>
</div>
<div id="info_true">
<%= label :access_rights, "Completed", value: true %>
<%= form.radio_button :build_one, true, :value => true, id: "build_one_2" %>
</div>
</div>
<div class="actions">
<%= form.submit id: "build_one", :style => "visibility:hidden;", data: { confirm: "Are you sure?"} %>
</div>