I’m trying to SUM the places of the first 5 finishers in a Cross
Country running event. In a Cross Country race the team score is
based upon the sum of the top 5 runners on your team. The lowest team
score at the competition wins.
I have EVENTS(the race), PARTICIPANTS(the runner), and
EVENT_PARTICIPANTS(a runner in a race).
Within event_participant I have this code, which doesn’t work as it
adds places beyond the 5th runner.
self.calculate(:sum, :finish_place, :order
=> :finish_place, :limit => 5)
It appears that the LIMIT is ignored or is applied after the