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

require 'rails_admin/support/datetime'

module RailsAdmin
  class AbstractModel
    cattr_accessor :all
    attr_reader :adapter, :model_name

    clas
    
    def each_associated_children(object)
      associations.each do |association|
        case association.type
        when :has_one
          child = object.send(association.name)
          yield(association, [child]) if child
        when :has_many
          children = object.send(association.name)
          yield(association, Array.new(children))
        end
      end