leeky
(Robert Lee-Cann)
July 23, 2014, 10:35am
1
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:
collection do
delete 'destroy_multiple'
end
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
1 Like
leeky
(Robert Lee-Cann)
July 23, 2014, 1:53pm
3
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.
1 Like