Handling checkbox in rails?

Dear all,

I have a doubt in using checkbox in my task?

I have used four check box for selecting multiple options while adding a
new record. Like,

    <%= check_box("upload", :selected => @selected) %>
    <%= check_box("download", :selected => @selected) %>
    <%= check_box("rename", :selected => @selected) %>
    <%= check_box("delete", :selected => @selected) %>

So i have got four check box to select upload, download, rename, delete.

If suppose i have selected upload and download option and added to DB.
its working fine. While listing the records also its working fine but
while modifying the record the upload and download fields are not shown
in the view as selected.

Could anyone please suggest about the methods to perform the modifying
option in case of check box.

Thanks in advance

Regards,
Jose Martin

On 8 Sep 2008, at 12:20, dare ruby wrote:

   <%= check_box("download", :selected => @selected) %>
   <%= check_box("rename", :selected => @selected) %>
   <%= check_box("delete", :selected => @selected) %>

So i have got four check box to select upload, download, rename,
delete.

If you check the api docs for check_box you’ll see that’s not all the
parameters it’s expecting

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs