Render response for view `update_many` method
        (collection PUT/PATCH)
767449
def render_update_many(self, value, system, common_kw):
        
        msg = 'Updated {} {}(s) objects'.format(
            value, system['view'].Model.__name__)
        return JHTTPOk(msg, **common_kw.copy())
456822
function updateWithHandler (ddoc, viewName, docName, body, callback) {
      if (typeof body === 'function') {
        callback = body
        body = undefined
      }
      return view(ddoc, viewName + '/' + encodeURIComponent(docName), {
        type: 'update',
        method: 'PUT',
        body: body
      }, callback)
    }
749536
function update (state) {
    assert.ifError(inRenderingTransaction, 'infinite loop detected')

    // request a redraw for next frame
    if (currentState === null && !redrawScheduled) {
      redrawScheduled = true

      raf(function redraw () {
        redrawScheduled = false
        if (!currentState) return

        inRenderingTransaction = true
        var newTree = view(currentState)
        const patches = vdom.diff(tree, newTree)
        inRenderingTransaction = false

        target = vdom.patch(target, patches)
        tree = newTree
        currentState = null
      })
    }

    // update data for redraw
    currentState = state
  }
29899
def update(self, *, visible=None, comment=None):
        
        if visible is None and comment is None:
            raise ValueError('Provide "visible" or "comment" to update.')
        data = {}
        if visible is not None:
            data['visible'] = visible
        if comment is not None:
            data['comment'] = comment
        data = None if not data else data
        response = self.session.patch(self.build_url(''), data=data)
        if not response:
            return False
        data = response.json()

        self.visible = data.get('visible', self.visible)
        self.comment = data.get('comment', self.comment)
        return True
1106122
function update (req, res, next) {
    for (var key in req.body) {
      req.body[key] = utils.toNative(req.body[key])
    }

    var id = utils.toNative(req.params.id)
    var chain = db.get(name)

    chain = req.method === 'PATCH'
      ? chain.updateById(id, req.body)
      : chain.replaceById(id, req.body)

    var resource = chain.value()

    if (resource) {
      res.locals.data = resource
    }

    next()
  }
1218725
def update
      

      @client.redirect_urls << client_params[:add_redirect_url] if client_params[:add_redirect_url]
      
      @client.app_ids << BSON::ObjectId.new.to_s if client_params[:add_app_id]
      
      
      @client.versioned_update({"redirect_urls" => 1, "app_ids" => 1})

      if @client.op_success?
        render "show"
      else
        render "edit"
      end
      
    end
1041839
def view_as_consumer(
        wrapped_view: typing.Callable[[HttpRequest], HttpResponse],
        mapped_actions: typing.Optional[
            typing.Dict[str, str]
        ]=None) -> Type[AsyncConsumer]:
    
    if mapped_actions is None:
        mapped_actions = {
            'create': 'PUT',
            'update': 'PATCH',
            'list': 'GET',
            'retrieve': 'GET'
        }

    class DjangoViewWrapper(DjangoViewAsConsumer):
        view = wrapped_view
        actions = mapped_actions

    return DjangoViewWrapper
749484
def update
      self.resource = find_resource
      
      respond_to do |format|
        if resource.update( resource_params )
          format.html { redirect_to resource_url, notice: "#{resource_name.humanize} was successfully updated." }
          format.js
          format.json { render :show, status: :ok, location: resource_url }
        else
          format.html { render :edit }
          format.js   { render :edit }
          format.json { render json: resource.errors, status: :unprocessable_entity }
        end
      end
    end
1157373
def update
      if @resource.update(resource_params)
        redirect_to [main_app, @resource], notice: t('.notice', default: update_message)
      else
        render :edit
      end
    end
338010
def update
			@instance = get_model.find(params[:id])

			respond_to do |format|
				if @instance.update(instance_params)
					flash[:notice] = "#{get_model.name} was successfully updated."
					format.html { render 'quick_dry/show' }
					format.json { render json:@instance, status: :ok, location: get_url}
				else
					format.html { render 'quick_dry/edit' }
					format.json { render json: @instance.errors, status: :unprocessable_entity}
				end
			end
		end
1015824
def update(self, **kwargs):
        
        self.reload_context(es_based=False, **kwargs)
        return super(ESCollectionView, self).update(**kwargs)
20952
def new
      respond_to do |format|
        format.html do
          render :new, locals: { comment: Comment.new, target_id: params[:id] }
        end
      end
    end
561284
function (context, callback) {

            var self = this,
                options = {},
                model,
                processor,
                isPatch = context.request.method === "PATCH",
                upsert = this.$resourceConfiguration.$.upsert,
                defaults;


            flow()
                .seq("collection", function (cb) {
                    self._findCollection(context, cb);
                })
                .seq(function (cb) {
                    model = this.vars.collection.createItem(self.$resourceId);
                    defaults = _.clone(model.$);
                    // check if model exists
                    if (upsert && !isPatch) {
                        cb();
                    } else {
                        model.fetch(null, cb);
                    }
                })
                .seq(function () {
                    if (!isPatch) {
                        model.clear();
                        model.set(defaults);
                    }

                    var payload = context.request.params;

                    processor = self.$restHandler.$restDataSource.getProcessorForModel(model);

                    model.set(processor.parse(model, payload || {}));

                    options.action = DataSource.ACTION.UPDATE;

                    // TODO: add hook to add session data like user id
                    if (upsert === true) {
                        options.upsert = true;
                        model.set(model.idField, model.factory.prototype.convertIdentifier(self.$resourceId));
                    }
                })
                .seq(function () {
                    self._generateAutoValues(model);
                })
                .seq(function (cb) {
                    self._validate(model, context, cb);
                })
                .seq(function (cb) {
                    self._beforeModelSave(model, context, cb);
                })
                .seq(function (cb) {
                    self._beforeModelUpdate(model, context, cb);
                })
                .seq(function (cb) {
                    model.validateAndSave(options, cb);
                })
                .seq(function (cb) {
                    self._afterModelUpdate(model, context, cb);
                })
                .exec(function (err, results) {
                    if (!err) {
                        // TODO: do correct invalidation
                        results.collection.invalidatePageCache();

                        self._fetchAllHrefsForModel(model, context);

                        // TODO: generate the location header
                        var body = JSON.stringify(processor.compose(model, null));

                        var response = context.response;
                        response.writeHead(200, "", {
                            'Content-Type': 'application/json'
                            // TODO : add updated date in head ???
//                            'Location': context.request.urlInfo.uri
                        });

                        response.write(body);
                        response.end();

                        callback(null);
                    } else {
                        if (!(err instanceof HttpError)) {
                            var statusCode = 400;
                            if (err === DataSource.ERROR.NOT_FOUND) {
                                statusCode = 404;
                            }
                            err = new HttpError(err, statusCode);
                        }
                        callback(err);
                    }
                });

        }
961155
def tickets_update_many(self, data, ids=None, **kwargs):
        ""
        api_path = "/api/v2/tickets/update_many.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if ids:
            api_query.update({
                "ids": ids,
            })
        return self.call(api_path, query=api_query, method="PUT", data=data, **kwargs)
1029847
protected function updateCollection(){
        $responseBody = $this->Response->getBody();
        if (is_array($responseBody)){
            if (isset($this->model)){
                $modelIdKey = $this->buildModel()->modelIdKey();
                foreach($responseBody as $key => $model){
                    if (isset($model[$modelIdKey])){
                        $this->collection[$model[$modelIdKey]] = $model;
                    } else {
                        $this->collection[] = $model;
                    }
                }
            } else {
                $this->collection = $responseBody;
            }
        }
    }
938027
def render_collection(collection, member_fields, view = nil, context: Attributor::DEFAULT_ROOT_CONTEXT)
      render(collection, [member_fields], view, context: context)
    end
575495
function ($ul, collection, updater, refresh) {
            var json = _(collection.models).map(function (m) {
                var ret = _.clone(m.attributes);
                _.extend(ret, { id: m.id, cid: m.cid });
                return ret;
            });
            this.updateJSON($ul, json, updater, refresh);
        }