class Runner < ActiveRecord::Base
has_many :participations
has_many :races, through: :participations
end
class Participation < ActiveRecord::Base
belongs_to :runner
belongs_to :race
# t.integer finish_time
end
class Race < ActiveRecord::Base
has_many :participations
has_many :runners, through: :participations
end