[Rails] Re: checkboxes in a loop - I get the same id

2010-04-22 Thread oren
works, thank you! On Apr 19, 10:32 pm, Frederick Cheung wrote: > On Apr 19, 9:19 pm, oren wrote: > > > This is the output: > > > > value="4" /> > > > value="5" /> > > > I try to use cucumber and check only one of them (or all of them) but > > need an id. > > You can override the automatically

[Rails] Re: checkboxes in a loop - I get the same id

2010-04-19 Thread Frederick Cheung
On Apr 19, 9:19 pm, oren wrote: > This is the output: > > value="4" /> > value="5" /> > > I try to use cucumber and check only one of them (or all of them) but > need an id. > You can override the automatically generated id with anything of your choice (the last argument to check_box_tag is a

[Rails] Re: checkboxes in a loop - I get the same id

2010-04-19 Thread Me
what about key_form.id? On Apr 19, 3:19 pm, oren wrote: > <% f.fields_for :keys do |key_form| %> >     <%= check_box_tag "keys_to_update[]", key_form.object.id %> >     <%= key_form.label :name, key_form.object.name %> > <% end %> > > This is the output: > > value="4" /> > value="5" /> > > I tr