I have a Rails application that is trying to delete multiple objects at a time.
I have tried like sending set of id seperated by \',\' to rails destroy method,but it
I had exactly the same problem, but the solution here did not work for me in rails 5.1.6.
Perhaps you pass parameter params[:ids] in the wrong way.
params[:ids]
Here's how I fix it.
Model.where(:id => params[:ids]).destroy_all
ids = params[:ids].split(",") Model.where(:id => ids).destroy_all