title: Deleting multiple table entries with check boxes rails
body: <p>I was wondering if there is a way to delete multiple table entries on my index.html.erb page by using checkboxes next to each entry, and then having a "delete selected entries" button at the end of it.
  Sorry if this is a simple question, but I only recently started coding in rails (and it is also rails 4 which has very few guides). </p>
  
  <p>Thank you for your time!</p>
  
  <p>EDIT reply for Mirko Akkov:</p>
  
  <pre><code>def destroy
  User.where(id: params[:ids]).destroy_all
  @user.destroy
  redirect...
  end
  </code></pre>
  
  <p>and the index.html:</p>
  
  <pre><code>&lt;table&gt;
  ...
  ...
  &lt;td&gt;&lt;span id='pdf_link'&gt;&lt;%= link_to 'Delete', user, title: 'Delete user', method: :delete, data: { confirm: 'Are you sure?' } %&gt;&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input type="checkbox" value="1" name="ids[]"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;% end %&gt;
  &lt;% end %&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>