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

module Super
  # Provides a default implementation for each of 
    
    def redirect_to_record_with_destroy_failure_message(error = nil)
      flash.alert =
        case error
        when ActiveRecord::InvalidForeignKey
          I18n.t("super.destroy_error.invalid_foreign_key")
        else
          I18n.t("super.destroy_error.generic")
        end