Forum: Ruby on Rails check_box_tag or check_box which is fit for that?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
80c1860bd22c8e295be401a6c6970396?d=identicon&s=25 Ichikawa Amin (ichikawa)
on 2007-05-28 06:48
When I use
<% for count in @total_cellno %>
<%= check_box_tag("checkbox", value = count, checked = false) %>
<% end %>
It produce the html
<input id="checkbox" name="checkbox" type="checkbox" value="0" />
<input id="checkbox" name="checkbox" type="checkbox" value="3" />

And controller model
   @total << params[:checkbox]

but the controller model holds one value from the chacked values.

using check_box() I can not fullfill my condition as I can not changed
the value of each check box.

So please help me to reach to my goal.

Bcbb8f89441d8feffa6819ef4d5373ee?d=identicon&s=25 Josh (Guest)
on 2007-05-28 10:37
(Received via mailing list)
I believe if you make the name of the checkbox, "checkbox[]", instead
of "checkbox", it will give you a list of the values that were

Does that help?

On May 27, 9:48 pm, Ichikawa Amin <>
This topic is locked and can not be replied to.