need help with check boxes

Hello everybody,

I have created check box in an rhtml file and want to have its id and
name of all the items that are checked, in controller class that it is
linked can i get it? This is my scenario in rhtml file....

<form action="/admin/list_supplier" method='POST'>

<% i = 0 %>
<% @hotels.each do |hotel| %>

<input type="checkbox" id="<%=hotel.group_name%>_<%=i%>" name="<
%=hotel.group_name%>[<%=i%>]" value= "<%=i%>" onclick="submit"


<% i = i + 1 %>
<% end %>

<input type='submit' value='change to approve'/>

The value of @hotels, i am getting from controller where one of the
column is group_name.
So how can get the id, name and value of the items checked in the
concern controller class(admin).
Any help would be really appreciated,
thanks in advance,


Why are you using an artificial counter (i) rather than the id column
of the hotel?

I would suggest this Wiki article as a good place to look for a
variety of suggestions