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: language_configs_controller.rb
    path of file: ./repos/texterify/app/controllers/api/v1
    
    the code of the file until where you have to start completion: class Api::V1::LanguageConfigsController < Api::V1::ApiController
  def index
    project = current_user.projects.find(params[:project_id])
    export_config = project.export_configs.find(params[:export_config_id])

    authorize LanguageConfig.new(export_config_id: export_config.id)

    language_configs = export_config.language_configs
    render js
    
  def update
    project = current_user.projects.find(params[:project_id])
    export_config = project.export_configs.find(params[:export_config_id])
    language_config = export_config.language_configs.find(params[:id])

    authorize language_config

    language = project.languages.find(params[:language_id])
    language_config.language = language

    if language_config.update(language_config_params)
      render json: ExportConfigSerializer.new(export_config).serialized_json
    else
      render json: { errors: language_config.errors.details }, status: :bad_request
    end