mercredi 31 août 2016

rails: link_to to pass list of selected checkboxes into params

I am not sure what the correct approach is for my situation:

I want to create a link_to pushing all checkboxes with value="1" into an array, or individually if array is not possible, but I am at a loss of how to express that?

<% @cards.each do |card| %>
    <%= check_box("#{card.name}", card.id, {checked: true}) %><%= "#{card.name}" %>
<% end %>

(Rails 4.2)




Aucun commentaire:

Enregistrer un commentaire