$.Model.destroy(id, success, error)
{String|Number}
the id of the instance you want destroyed
{Function}
the callback function, it must be called with an object that has the id of the new instance and any other attributes the service needs to add.
{Function}
a function to callback if something goes wrong.
Destroy is used to remove a model instance from the server. By implementing destroy along with the rest of the service api, your models provide an abstract service API.
You can implement destroy with a string like:
Or you can implement destroy manually like:
You just have to call success if the destroy was successful.