Hello, I'm trying to use a delete_all method to kill some information in my database. Where my model is 'prov', my code is:
Prov.delete_all(["created_at < ?", @currenttime],["bill_cycle_date == ?", @cycle_date])
Basically the equivalent to the SQL statement:
DELETE FROM provs WHERE created_at < @currenttime AND bill_cycle_date = @cycle_date
However, the first bit doesn't work and it tells me that it is the incorrect number of arguments. Can somebody please clarify how to do this?
Thanks, - Jeff Miller