I have my view where I am showing all the records and I need to add a checkbox for multiple selection, I am doing it in the following way:
<%= form_tag("/user_selection", method: 'get', remote: true, class: "form-horizontal" ) do %><!--responde al index-->
<div class="rwd">
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<th>name</th>
<th>last name</th>
</tr>
</thead>
<tbody id="container_users">
<%= render @users %>
</tbody>
</table>
<%= paginate @users, :param_name => 'users' %>
</div>
<%= submit_tag "send", data: { disable_with: 'sending...' } %>
<% end %>
partial user
<tr id="user_<%= user.Id %>">
<td><%=user.try(:name)%></td>
<td><%=user.try(:lastname)%></td>
<td><%= check_box_tag "items[]", user.Id %></td>
</tr>
This way I can select multiple records and send the ids to the controller, the problem comes when I select the records and I go to the next page using the page of kaminari, when passing from page the records of the previous page are no longer selected, like could you solve it?