diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-24 17:58:22 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-24 17:58:22 -0400 |
commit | 76ee2a59964be6707cab25053697a2d848bbcd52 (patch) | |
tree | d9e815057b04cfb3af2b0c98ca3c2d1c808c4f3b /app/views/matches/index.html.erb | |
parent | 7fe1894becda038c3e85ba179dc27ce3b54690dc (diff) | |
parent | 976325f60e7706e480f3d45848897200734c8485 (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.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..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 %> |