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: fact_values_controller.rb
    path of file: ./repos/foreman/app/controllers
    
    the code of the file until where you have to start completion: class FactVa
    
  def index
    respond_to do |format|
      format.html do
        @fact_values = @fact_values.preload(related_tables).paginate(:page => params[:page], :per_page => params[:per_page])
        render :index
      end
      format.csv do
        csv_response(@fact_values.joins(related_tables).includes(related_tables))
      end
    end
  end