[Rails] Re: to get multiple check_box values in controller

2009-03-06 Thread Darren Jeacocke
Is there a way to have this working while being able to use labels, and being valid HTML? Ie, unique IDs for the inputs? no - you want the output to be input id=user[language_id][] name=user[language_id][] type=checkbox value=3 / and then params[:user][:language_id] will be an array

[Rails] Re: to get multiple check_box values in controller

2008-09-17 Thread Frederick Cheung
On 17 Sep 2008, at 10:41, Sijo Kg wrote: Hi Thanks for the reply I tried like % for language in @languages % %= language.language % %= check_box_tag(user[#{language.id}][],#{language.id}) % % end % And the source obtained is English input id=user[1][] name=user[1][]