From 992dc06e50d74aca79ed58d868be6113e3ebe55c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 24 Apr 2014 16:58:57 -0400 Subject: do away with stages_ordered --- app/views/matches/index.html.erb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/views/matches/index.html.erb') 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 @@ - <% @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| %> <% match = stage.matches_ordered[match_key] %> <%= "Match #{match.id}" %> @@ -36,6 +35,6 @@
-<% @tournament.stages_ordered.keys.sort.each do |stage_key| %> -
<%= raw @tournament.stages_ordered[stage_key].to_svg(current_user) %>
+<% @tournament.tournament_stages.ordered(:id).each do |stage| %> +
<%= raw stage.to_svg(current_user) %>
<% end %> -- cgit v1.2.3-2-g168b From 27c3e207b299e6c5a94a1ab81412bb9e11a0d92a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 24 Apr 2014 17:01:42 -0400 Subject: rename Tournament#tournament_stages to Tournament#stages --- app/views/matches/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/matches/index.html.erb') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index d8538df..761f12a 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -12,7 +12,7 @@ - <% @tournament.tournament_stages.ordered(:id)each do |stage| %> + <% @tournament.stages.ordered(:id)each do |stage| %> <% stage.matches_ordered.keys.sort.reverse.each do |match_key| %> <% match = stage.matches_ordered[match_key] %> <%= "Match #{match.id}" %> @@ -35,6 +35,6 @@
-<% @tournament.tournament_stages.ordered(:id).each do |stage| %> +<% @tournament.stages.ordered(:id).each do |stage| %>
<%= raw stage.to_svg(current_user) %>
<% end %> -- cgit v1.2.3-2-g168b From 976325f60e7706e480f3d45848897200734c8485 Mon Sep 17 00:00:00 2001 From: tkimia Date: Thu, 24 Apr 2014 17:46:09 -0400 Subject: luke's typo fix --- app/views/matches/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/matches/index.html.erb') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 761f12a..784d7db 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -12,7 +12,7 @@ - <% @tournament.stages.ordered(:id)each do |stage| %> + <% @tournament.stages.order(:id).each do |stage| %> <% stage.matches_ordered.keys.sort.reverse.each do |match_key| %> <% match = stage.matches_ordered[match_key] %> <%= "Match #{match.id}" %> @@ -35,6 +35,6 @@
-<% @tournament.stages.ordered(:id).each do |stage| %> +<% @tournament.stages.order(:id).each do |stage| %>
<%= raw stage.to_svg(current_user) %>
<% end %> -- cgit v1.2.3-2-g168b