This is really useful, as I keep googling it everytime I wanna do this with the rails console…
Part.find(:all).each{|p|p.destroy} |
Got it from the comment section from this post
A much shorter way of doing so, as comment by skim,
Part.destroy_all |
This is really useful, as I keep googling it everytime I wanna do this with the rails console…
Part.find(:all).each{|p|p.destroy} |
Got it from the comment section from this post
A much shorter way of doing so, as comment by skim,
Part.destroy_all |
skim
You should just be able to do:
Part.destroy_all
kahfei
shorter and sweeter, thanks for the tips, skim