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: actions_controller.rb
    path of file: ./repos/rails-pg-extras/app/controllers/rails_pg_extras/web
    
    the code of the file until where you have to start completion: module RailsPgExtras
    
    def run(action)
      begin
        RailsPgExtras.run_query(query_name: action, in_format: :raw)
        redirect_to root_path, notice: "Successfully ran #{action}"
      rescue ActiveRecord::StatementInvalid => e
        redirect_to root_path, alert: "Error: #{e.message}"
      end