summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0e05e46)
apply_retention(votes, votes_sum * params['percent_retention'])
end
apply_retention(votes, votes_sum * params['percent_retention'])
end
+ unless votes.length > 0
+ @winners=[nil]
+ return
+ end
+
begin
ranked_candidates = votes.sort do |a, b|
b[1][0] <=> a[1][0]
begin
ranked_candidates = votes.sort do |a, b|
b[1][0] <=> a[1][0]