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: tabular_reflex.rb
    path of file: ./repos/stimulus_reflex_expo/app/reflexes
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class TabularReflex < ApplicationReflex
  include Tabular

  def search
    params[:query] = element[:value].strip
    update_client
  end

  def order
    params[:order_by] =
    
  def update_client
    prepare_variables

    assigns = {
      query: @query,
      order_by: @order_by,
      direction: @direction,
      page: @page,
      pagy: @pagy,
      restaurants: @restaurants
    }

    uri = URI.parse([request.base_url, request.path].join)
    uri.query = assigns.except(:restaurants, :pagy).to_query

    morph :nothing

    cable_ready
      .inner_html(selector: "#search-results", html: render(partial: "tabulars/search_results", assigns: assigns))
      .push_state(url: uri.to_s)
      .broadcast
  end