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: reorder_action.rb
    path of file: ./repos/comfortable-mexican-sofa/app/controllers/concerns/comfy
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Comfy::ReorderAction

  extend ActiveSupport::Concern

  included do
    mattr_accessor :reorder_action_reso
    
  def reorder
    resource_class = self.class.reorder_action_resource
    (params.permit(order: [])[:order] || []).each_with_index do |id, index|
      resource_class.where(id: id).update_all(position: index)
    end
    head :ok
  end