What’s the right way to use the CHECK_BOX_TAG?

I used:

<% for @pippo in @model %>
<%= check_box_tag (:scelta,@pippo) %>
<% end %>

How Can I control if a person choosen the second or third element of the
vector @pippo?

You need to use this form

<%= check_box_tag(‘scelta[]’, @pippo) %>

then in controller you can access params[:scelta] as collection which
can iterate through and do the required checks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs