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: singular_association.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.3/lib/active_record/associations/preloader
    
    the code of the file until where you have to start completion: module ActiveRecord
  module Associations
    class Preloader
      class SingularAssociation < Association #:nodoc:

        private

        def preload(preloade
    
        def preload(preloader)
          associated_records_by_owner(preloader).each do |owner, associated_records|
            record = associated_records.first

            association = owner.association(reflection.name)
            association.target = record
          end
        end