Topic: Checkboxes in rails returning no value? How to get Checkboxes working

I am trying to get the values from my check boxes, but whenever I use params[:chosen], it seems to always return nil. What am I missing? is params the right way to do it?

This is the line I have in my view:


          <%=label_tag :chosen, "Choose Image" %>
          <%= check_box("product", "images", {checked: true}) %>
          <%= check_box_tag "chosen[#{i}]",1,true %></td

I tried check box also, but when i do params['images'], i still get nothing
                  <%= check_box("product", "images", {checked: true}) %>

this does produce the checkboxes but I can never seem to get the value from it. Do I need to put something in the controller?

Thank you

Re: Checkboxes in rails returning no value? How to get Checkboxes working

Maybe these can help:
http://stackoverflow.com/questions/6391 … -in-a-form
http://stackoverflow.com/questions/1121 … with-rails
http://stackoverflow.com/questions/6186 … k-in-rails