summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/match.rb4
-rw-r--r--app/views/matches/show.html.erb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index 57b7d36..85084f5 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -7,8 +7,8 @@ class Match < ActiveRecord::Base
def finished?
ok = true
- tournament_stage.scoring_method.stats_needed.each do |stat|
- ok &= statistics.where(match: self, name: stat).nil?
+ tournament_stage.scoring.stats_needed.each do |stat|
+ ok &= !statistics.where(match: self, name: stat).nil?
end
ok
end
diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb
index 01484d3..bf5518f 100644
--- a/app/views/matches/show.html.erb
+++ b/app/views/matches/show.html.erb
@@ -5,7 +5,7 @@
</p>
<p>
<strong>Tournament stage:</strong>
- <%= @match.tournament_stage %>
+ <%= @tournament.stages.order(:id).index(@match.tournament_stage)+1 %>
</p>
<%#