activerecord/lib/active_record/associations/has_many_through_association.rb
def build_through_record(record)
          @through_records[record.object_id] ||= begin
            ensure_mutable

            through_record = through_association.build(*options_for_through_record)
            through_record.send("#{source_reflection.name}=", record)
            through_record
          end
        end
# The through record (built with build_record) is temporarily cached
# so that it may be reused if insert_record is subsequently called.
#
# However, after insert_record has been called, the cache is cleared in
# order to allow multiple instances of the same record in an association.
The through record (built with build_record) is temporarily cached
so that it may be reused if insert_record is subsequently called.

However, after insert_record has been called, the cache is cleared in
order to allow multiple instances of the same record in an association.
The through record ( built with build_record ) is temporarily cached so that it may be reused if insert_record is subsequently called . However after insert_record has been called the cache is cleared in order to allow multiple instances of the same record in an association .
def build_through_record(record)
          @through_records[record.object_id] ||= begin
            ensure_mutable
            through_record = through_association.build(*options_for_through_record)
            through_record.send("#{source_reflection.name}=", record)
            through_record
          end
        end
def build_through_record ( record ) @through_records [ record . object_id ] ||= begin ensure_mutable through_record = through_association . build ( * options_for_through_record ) through_record . send ( "#{source_reflection.name}=" , record ) through_record end end
The through record (built with build_record) is temporarily cached
so that it may be reused if insert_record is subsequently called.
The through record ( built with build_record ) is temporarily cached so that it may be reused if insert_record is subsequently called .
record