method
build_through_record
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::Associations::HasManyThroughAssociation
build_through_record(record)private
We temporarily cache through record that has been build, because if we build a through record in build_record and then subsequently call insert_record, then we want to use the exact same object.
However, after insert_record has been called, we clear the cache entry because we want it to be possible to have multiple instances of the same record in an association