summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-24 19:03:41 -0400
committernfoy <nfoy@purdue.edu>2014-04-24 19:03:41 -0400
commit1b11684986136ee87da6242c3ba6aba5ef581510 (patch)
treed7ec999baced4836a9b3b7b31eee39cfe09410c9 /app/views
parent9823642115ef52f0a21b9466cef412098a124f3d (diff)
parentdb073045ff7cf5d8a2fb4a3349ed6a9a6ac019d3 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views')
-rw-r--r--app/views/matches/index.html.erb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
index 8a50fee..784d7db 100644
--- a/app/views/matches/index.html.erb
+++ b/app/views/matches/index.html.erb
@@ -12,8 +12,7 @@
</tr>
</thead>
<tbody>
- <% @tournament.stages_ordered.keys.sort.each do |stage_key| %>
- <% stage = @tournament.stages_ordered[stage_key] %>
+ <% @tournament.stages.order(:id).each do |stage| %>
<% stage.matches_ordered.keys.sort.reverse.each do |match_key| %><tr>
<% match = stage.matches_ordered[match_key] %>
<td><%= "Match #{match.id}" %></td>
@@ -36,6 +35,6 @@
<br>
-<% @tournament.stages_ordered.keys.sort.each do |stage_key| %>
- <div class="graph"><%= raw @tournament.stages_ordered[stage_key].to_svg(current_user) %></div>
+<% @tournament.stages.order(:id).each do |stage| %>
+ <div class="graph"><%= raw stage.to_svg(current_user) %></div>
<% end %>