what is your idea of mass action still sticking with rails restful out of the box methods? like a mass delete.
I was tempted to create a mass_delete method already on my controller can't seem to wrap my head around if there's any existing or more elegant way to handle mass actions.
just shopping for ideas.
thanks.
You can make the delete be a "collection" method in you routes
resources :items do
collection do
delete 'delete'
end
end
This will create an "/items/delete" - the idea being that you are now working on the collection of Item resources.
Also; I am actually not 100% sure that you can use the delete verb here, and I don't think there is anything particularly wrong with adding your own methods to the controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With