Method Assigning

Hi Guys,

I am working out for assigning the check boxes to the new entries in a
view(form). And now the thing is i have to add functionality to those
check boxes so that when i make multiple selections and press a button
called delete then the checked items all must be deleted. The table i am
using in MySql is documents, which has filename, description and
uploaddate as the columns.I have a delete method assigned to each and
every column.But When i select the delete function assigned to those
checked items, then all the selected items must be deleted.

                                               Regards,
                                              Chandoo..

something along the lines of:

@documents_to_delete =
Document.find(params[:documents_selected_on_form])
@documents_to_delete.each{|this_document| this_document.destroy}

?

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