Correctly handling multiple tournaments now, yay!

This commit is contained in:
Dan Buch
2012-03-12 23:28:38 -04:00
parent b14cdd3c9e
commit ec948315aa
6 changed files with 57 additions and 35 deletions

View File

@@ -1,9 +0,0 @@
<h1>New Map Mash tournament!</h1>
<% form_for(@mash_tournament) do |f| %>
<%= f.error_messages %>
<p>
<%= f.submit 'Start' %>
</p>
<% end %>

View File

@@ -0,0 +1,9 @@
%h1 New Map Mash tournament!
- form_for(@mash_tournament) do |f|
= f.error_messages
= f.label(:total_rounds)
= f.select(:total_rounds, total_rounds_options_for_select)
%p
= f.submit 'Start'

View File

@@ -1,5 +1,5 @@
%h1
You chose
Tournament #{@mash_tournament.id} Complete! You chose
%em #{@mash_tournament.rounds.reverse.first.mashes.first.winner.name}!
- @mash_tournament.rounds.reverse.each do |round|