summaryrefslogtreecommitdiff
path: root/app/views/matches/index.html.erb
diff options
context:
space:
mode:
authortkimia <tkimia@purdue.edu>2014-04-24 17:10:42 -0400
committertkimia <tkimia@purdue.edu>2014-04-24 17:10:42 -0400
commit74814dad443659e1e0875329c95cc0257de25b3b (patch)
tree04e1e00daa8da22cfff84d264b1af2edd37ad2b4 /app/views/matches/index.html.erb
parentdd9a7a6b55fd3a6a494ba41fc133b1f1056c66a9 (diff)
parentcba88607fef562846958a0baeda420fa2d7529ed (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views/matches/index.html.erb')
-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..761f12a 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.ordered(: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.ordered(:id).each do |stage| %>
+ <div class="graph"><%= raw stage.to_svg(current_user) %></div>
<% end %>