SMERM/EMUForm

View on GitHub
app/views/roles/_select_role.html.erb

Summary

Maintainability
Test Coverage
<!-- <hr class="author_role_selection_rule" /> -->

<h3><%= select_role.full_name %>:</h3>
<%= form.hidden_field(:id, name: 'works_roles_authors[authors_attributes][][id]', value: select_role.id) %>
<div class="role_selector" id="author_<%= select_role.to_param -%>">
  <%= form.fields_for(:role) do |r_form| %>
      <%= r_form.collection_check_boxes(:roles, roles, :id, :description, {}, { name: 'works_roles_authors[authors_attributes][][roles_attributes][][id]' }) do |b| %>
      <div class="checkbox">
          <%= b.check_box(class: 'role_checkbox') %>
          <%= b.label(class: 'role_label') %>
      </div>
      <% end %>
    <% end %>
  <hr>
</div>