diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-27 02:46:23 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-27 02:46:23 -0400 |
commit | 125d861972b9fcd99147d67b0e8fe4102f96190e (patch) | |
tree | 86b6d8d665a4e62592fe63836de9b19d4121f262 /app/views | |
parent | b7ef3c9078f40e5c23f53c59b7741883c3bc2fb7 (diff) | |
parent | 5301997c80401e0fa5d106dd4dbcd330b4708cfb (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/tournaments/standings.html.erb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/tournaments/standings.html.erb b/app/views/tournaments/standings.html.erb new file mode 100644 index 0000000..28d3c22 --- /dev/null +++ b/app/views/tournaments/standings.html.erb @@ -0,0 +1,12 @@ +<% playerscores = @tournament.players.collect {|player| player => tournament.statistics.getStatistic(player.matches.last, player, :score) } %> + +<table> + <tr> + <td>Standings:</td> + <% place = 0 %> + <% playerscores.sort {|player1, player2| playerscores[player1] <=> playerscores[player2] }.each |player| %> + <td><%= place.to_s + ":" %> <%= player.user_name %></td> + <% place += 1%> + <% end %> + </tr> +</table>
\ No newline at end of file |