0
I have a Select Box with some solver groups and a button to add them to the bank. By clicking the button, I add the solver group to the bank. But this is done one at a time. I would like to do this all at once.
Follow my code below:
<%= form_for(@solver_group_user, url: admin_user_create_permission_contract_group_path, html: {class: 'ui form'}) do |f| %>
<div class="two fields">
<div class="fifteen wide field">
<%= f.select(
:solver_group_id,
options_for_select(SolverGroup.where(contract: @contract, enable: 1).where.not(id: @user.solver_group).order(:name).map{
|v| [v.name, v.id]
}),
{},
{class: 'ui dropdown search menu_dropdown'}
) %>
</div>
<%= f.hidden_field :user_id, value: @user.id %>
<div class="two wide field">
<%= button_tag(type: 'submit', class: 'circular small ui blue icon button') do %>
<i class="icon save"></i>
<% end %>
</div>
</div>
<% end %>