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: transaction_exit_statement.rb
    path of file: ./repos/rubocop-rails/lib/rubocop/cop/rails
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module RuboCop
  module Cop
    module Rails
      # Checks for the use of exit statements (namely `return`,
      # `break` and `throw`) in transactions. This is due to the eventual
      # unexpected behavior when using ActiveRecord >= 7, where transactions
      # exited using these statements are be
    
        def on_send(node)
          return unless in_transaction_block?(node)

          exit_statements(node.parent.body).each do |statement_node|
            next if statement_node.break_type? && nested_block?(statement_node)

            statement = statement(statement_node)
            message = format(MSG, statement: statement)

            add_offense(statement_node, message: message)
          end
        end