docs: function update (controller, args) {
      // get model from controller
      var model = controller.model
      // get current instance loaded in before
      var instance = args[model.name+'Orig']
      // get model data from input
      var data = args[model.name]
      //  build update args
      var updateArgs = args.meta ? _.clone(data) : {data: data}
      // set force flag based on input
      if (args.force) {
          updateArgs.force = true
      }
      // set the merge flag to false unless explicitly set true
      if (!args.merge) {
          updateArgs.merge = false
      }
      // do update
      return instance.updateMeta(updateArgs)
      // redirect on success
      .then(instance => {
          // if in json mode return instance data
          if (args.json) {
              return instance
          }
          // otherwise redirect to instance page
          else {
              // use redirect from input or redirect to new instance
              var url = args.redirect || '../'+instance.id
              // redirect
              httpRedirect(url)
          }
      })
      // catch errors
      .catch(error => {
          // if error is redirect throw it
          if (error.code === 302) {
              throw error
          }
          // for version conflict errors return the current instance with the
          // error data and throw a 409 http error
          if (instance.isConflictError(error)) {
              // get current instance
              return instance.current()
              // throw 409 conflic error with current instance data
              .then(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')
                  }
              })
          }
          // if in json mode or there is no form return 400 error
          if (args.json || !controller.form) {
              httpError(400, undefined, _.pick(error, ['data', 'message']))
          }
          // create new form instance with input and error data
          var form = controller.form.newInstance({
              action: './update',
              input: data,
              error: error,
          })
          // javascript for page
          var js = []
          // if form uses ckeditor add js
          if (form.ckeditor) {
              js.push({
                  crossorigin: 'anonymous',
                  //integrity: 'sha256-TTtB6JD2qVpmE4ydlMyYH52d7OSMq5FQh2f0ECHR0Bw=',
                  src: '//cdn.jsdelivr.net/ckeditor/4.3.1/ckeditor.js',
              })
          }
          // return form
          return {
              form: form,
              js: js,
          }
      })
  }