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

module SolidusAdmin
  class StockLocationsController < SolidusAdmin::BaseController
    include Sol
    
    def index
      stock_locations = apply_search_to(
        Spree::StockLocation.order(id: :desc),
        param: :q,
      )

      set_page_and_extract_portion_from(stock_locations)

      respond_to do |format|
        format.html { render component('stock_locations/index').new(page: @page) }
      end
    end