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: option_types_controller.rb
    path of file: ./repos/solidus/backend/app/controllers/spree/admin
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Spree
  module Admin
    class OptionTypesController < ResourceController
      before_action :setup_new_option_value, only: :e
    
      def update_values_positions
        params[:positions].each do |id, index|
          Spree::OptionValue.where(id: id).update_all(position: index)
        end

        respond_to do |format|
          format.js { head :no_content }
        end
      end