You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: models_controller.rb
    path of file: ./repos/multiwoven/server/app/controllers/api/v1
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Api
  module V1
    class Models
    
      def update
        result = UpdateModel.call(
          model:,
          model_params:
        )

        if result.success?
          @model = result.model
          render json: @model, status: :ok
        else
          render_error(
            message: "Model update failed",
            status: :unprocessable_entity,
            details: format_errors(result.model)
          )
        end