Account.destroy_all :artist => "Garth Brooks" : Delete « ActiveRecord « Ruby






Account.destroy_all :artist => "Garth Brooks"


is the same as this:

DELETE FROM accounts WHERE artist = "Garth Brooks"

 








Related examples in the same category

1.delete the associated record from the database
2.Delete a record with destroy
3.find_by_sql