diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-28 00:00:47 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-28 00:00:47 -0400 |
commit | 919ba959bbc782315b0a8b171aa96e2118a43067 (patch) | |
tree | 572f84d4ccb3cca0abc558fdaf1b7633c33fe82c /app | |
parent | 1c37ae521e29a5e0869aba52d324ed0cd4a830a6 (diff) |
fixed the db seeds. They can now be started
Diffstat (limited to 'app')
-rw-r--r-- | app/models/match.rb | 1 | ||||
-rw-r--r-- | app/views/common/_show_tournament.html.erb | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/match.rb b/app/models/match.rb index d4c0ce5..ff81d68 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -12,6 +12,7 @@ class Match < ActiveRecord::Base ok = true tournament_stage.scoring_method.stats_needed.each do |stat| ok &= statistics.where(match: self, name: stat).nil? + end ok end diff --git a/app/views/common/_show_tournament.html.erb b/app/views/common/_show_tournament.html.erb index 151e5d2..12a7fea 100644 --- a/app/views/common/_show_tournament.html.erb +++ b/app/views/common/_show_tournament.html.erb @@ -33,8 +33,10 @@ <% else %> <p style="margin-top:10px;"> You've signed up for this tournament! </p> <% end %> - <%= form_tag(tournament_brackets_path(target), method: "post") do %> - <%= submit_tag("Make Bracket") %> + <% if target.status == 1 %> + <%= form_tag(tournament_brackets_path(target), method: "post") do %> + <%= submit_tag("Make Bracket") %> + <% end %> <% end %> <% end %> </div> |