I have a form where a user can select multiple checkboxes and then press a “Delete Selected” button to destroy the selected records from the database.
Currently, I have add the following to config/routes.rb:
This feels wrong, going against RESTful principles. Any suggestions to how I can improve this?
Hi @leeky, the good news is batch requests are coming in Rails 4.2
Thanks for the heads up, @pedromoreira!
Any chance you could point me towards any further information on it?
@leeky, not really. I know that it is one of the projects coming out one the student initiatives (either the one with Facebook or Google Summer of Code) but is not on rails master yet. Maybe @sikachu can help point to the development fork?
You could have a
PostsCollection object and controller which takes a list of posts and performs a delete on them.
For the sake of completeness, I believe this is the relevant PR to Rails: https://github.com/rails/rails/pull/15719