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

module CheckoutCallbacks
  extend ActiveSuppo
    
  def redirect_to_cart_path
    respond_to do |format|
      format.html do
        redirect_to main_app.cart_path
      end

      format.json do
        render json: { path: main_app.cart_path }, status: :bad_request
      end
    end
  end