def delete(field=nil)
      id ? 
        delete_with_id : 
        field ? 
          self.class.delete_all(field => self[field]) : 
          self.class.delete_all(attributes)
    end
def delete(field=nil)
      id ? 
        delete_with_id : 
        field ? 
          self.class.delete_all(field => self[field]) : 
          self.class.delete_all(attributes)
    end
by default model.delete() and model.destroy() won't work if model has no id