Skip to content
scottwillson edited this page Jan 8, 2012 · 2 revisions

Do we even need Participant? Or would Result#person, Result#people, Result#team be enough? Would that handle tandem results? What would logic look like when displaying results or working with competitions?

Refactor Results and Racers

Current model of Result belongs_to Racer and belongs_to Team is too simplistic. It requires clumsy and inadequate workarounds for results entry and competitions. Currently, team results are entered:

1 Steve Smith
  Donald Duck
  Mickey Mouse
2 Goofy
  Jame Carney
  Another Racer

And tandems:

1 Steve/Donald Smith/Duck
2 Jame/Another Carney/Racer

This workaround prevents us from entering ties.

Idea

Replace Racer with Participant. Kind of a yucky name. Finisher would be better, but Results include non-finishers as well. Really, what we want is PersonOrGroupOfPeopleWhoAppearInResults. Some system use Party, but that's not too ambiguous.

So, a Participant would normally be a Racer, but could also be a Team or many Racers. This should allow us to handle:

  1. One Racer
  2. One Team (member team like Gentle Lovers)
  3. "Ad-hoc" teams, like for team sprints on the track: Steven Beardsley + Peter Drake + Mike Murray
  4. Tandem teams like Steve Holland + Lynn Holland
  5. No one
  6. Ties

"Ad hoc" teams are split out into individuals for competitions like the Ironman and BAR. Tandem teams are tracked as unique entities for competitions.

One Step Further

Replace Racer with People. People can be Participants, and show up in results. Person could also replace the current User class.

Implementation

TK :)

Clone this wiki locally