docs: function deleteMethod (controller, actionName, args) {
      // get model from controller
      var model = controller.model
      // get record loaded in before
      var record = args[`${model.name}Orig`]
      // perform action
      return record[actionName]()
      // do response
      .then(record => {
          // if request is in json mode the return record data
          if (args.json) {
              return record
          }
          // otherwise redirect
          else {
              // redirect url is either eplicity passed, from http referrer,
              // or to record url
              var url = args.redirect || args.referrer || '../'
              // do 302 redirect
              return httpRedirect(url)
          }
      })
      // catch errors
      .catch(err => {
          // throw 409 on duplicate key error
          if (record.isConflictError(err)) {
              // get current instance
              return record.current()
              // throw 409 conflic error with current instance data
              .then(current => {
                  // check if current defined
                  record.assert(defined(current), 'could not fetch current')
                  // if in json mode return error with data
                  if (args.json) {
                      httpError(409, undefined, current)
                  }
                  // otherwise redirect to current instance
                  else {
                      httpRedirect(`../${current.id}?error=conflict`)
                  }
              })
          }
          // throw original error
          else {
              throw err
          }
      })
  }