diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-24 16:58:57 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-24 17:02:00 -0400 |
commit | 992dc06e50d74aca79ed58d868be6113e3ebe55c (patch) | |
tree | 0948a09823694597f49265a2ff8a3a724e5bbcc5 /app/views/matches/index.html.erb | |
parent | 6de6d3508fdd945168f8f74072af94b3754c9386 (diff) |
do away with stages_ordered
Diffstat (limited to 'app/views/matches/index.html.erb')
-rw-r--r-- | app/views/matches/index.html.erb | 7 |
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..d8538df 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.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.tournament_stages.ordered(:id).each do |stage| %> + <div class="graph"><%= raw stage.to_svg(current_user) %></div> <% end %> |