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: tax_rates_controller.rb
    path of file: ./repos/convene/app/furniture/marketplace
    
    the code of the file until where you have to start completion: class Marketplace
  class TaxRatesController < Controller
    expose :tax_rate, model: TaxRate, scope: -> { tax_rates },
      build: ->(params, scope) { scope.new(params.merge(marketplace: marketplace)) }
    expose :tax_rates, -> { policy_scope(bazaar.tax_rates) }

    def new
      authorize(tax_rate)
    end

    def index
      skip_authorization
    end

    def create
      if authorize(tax_rate).save
        redirect_to marketplace.location(child: :tax_rates)
      else
        render :new
      end
    end

    def edit
   
    
    def update
      authorize(tax_rate).update(tax_rate_params)

      respond_to do |format|
        format.turbo_stream do
          if tax_rate.errors.empty?
            render turbo_stream: turbo_stream.replace(tax_rate, TaxRateComponent.new(tax_rate: tax_rate).render_in(view_context))
          else
            render turbo_stream: turbo_stream.replace(tax_rate, partial: "form")
          end
        end

        format.html do
          if tax_rate.errors.empty?
            redirect_to marketplace.location(child: :tax_rates)
          else
            render :edit
          end
        end