If you need to allow callbacks to run or dependent associations to also
be
destroyed, you can use Task.destroy_all. If you don’t need those things,
Task.delete_all will be much faster.
Do I need another action for this, and what should the link to it be?
I’d now like to take this a step further and allow users to select
which tasks they want to delete (using check boxes probably) then
select ‘delete all checked tasks’. Does anybody have any pointers on
how to go about this and how the form would look? I’m guessing that I
would need to create a @selected_tasks array somehow from what was
submitted and then call delete_all on that?
cheers,
DAZ
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.