I have a current form that inherits from model user and builds a form and a drop down for a selection of a role. I am currently trying to allow for multiple selectinos of roles
<% @users.each do |u| %>
<tr>
<td><%= u.id %></td>
<td><%= u.email %></td>
<td><%= u.created_at %></td>
<td><% if u.is_admin? %>Yes<% else %>No<% end %></td>
<% if u.is_admin? %>
<td>
Admin
</td>
<td>
</td>
<% else %>
<%= form_with model: User, url: user_update_roles_path(u.id), method: :put do |form| %>
<td>
<%= form.select :role, Role.all.map(&:name), selected: u.role %>
</td>
<td>
<%= form.submit "Update" %>
</td>
<% end %>
How would I try to go about allowing the selection of multiple roles in my form to which it updates it?