Marnen Laibow-Koser wrote:
> Sindri Guðmundsson wrote:
>> Marnen Laibow-Koser wrote:
>>> [...]
>>> 
>>> This is strange code.  You're inside a form_for, so why are you using 
>>> check_box_tag rather than check_box ?
>> 
>> I read somewhere that I shouldn't do it like this, but I couldn't get 
>> the info on checked/uncecked using check_box. Should I get rid of the 
>> form_for and change the submit button to POST button_to? Why?
> 
> No, you should fix the problem that's preventing you from using 
> check_box!
> 
>> 
>> 
>> Thanks Saurabh Peshkar, ofc I should've done that, thanks! :)
> 
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> [email protected]

Hi,
I've tried that, but I can't seem to have check_box write anything else 
to params[:cats] other than nil. The only thing that happened was that 
params[:cats] was an array the same length as the number of categories I 
had but only contained nil-objects. Could you please show me how I 
should generate the check_boxes inside the loop in my view?

BR,
Sindri

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to