If you want statistic
to belong to race
only, you don't need to use has_many :through
. All you need to do is to add the new reference when building a statistic
entry by either a new object:
@race = Race.new(....)
@person.statistics.build(value: @value, updated: @updated, race: @race)
or by foreign key (if the referenced race already exists)
@person.statistics.build(value: @value, updated: @updated, race_id: @race.id)