Is there a way to multi-select items in the admin ...
# general
g
Is there a way to multi-select items in the admin that I'm missing? I'm building a script to import data, sometimes an iteration goes wrong and I need to delete ~30 pages of products (or tax rates, or users, etc). It would be handy to have a way to not have to delete them one at a time 😛
j
You can't do this in the admin, but if you're a developer (or have one handy) that's pretty trivial to do on the console.
g
Gotcha, we're still finding our way around ruby / rails / solidus, so we're not always familiar with what's doable from the console
j
If you know the slugs of the products you want to destroy, you should be able to do something like:
Copy code
Spree::Product.where(slug: array_of_slugs_for_the_products_you_want_to_delete).destroy_all
👍 1