Getting at least one tournament working!

This commit is contained in:
Dan Buch
2012-03-12 00:18:42 -04:00
parent 73cff897a3
commit d08362326d
10 changed files with 66 additions and 79 deletions

View File

@@ -39,9 +39,12 @@ class MashTournamentsController < ApplicationController
@mash_tournament = MashTournament.new(
:requester => Requester.new(:ip => request.remote_ip)
)
respond_to do |format|
if @mash_tournament.save && @mash_tournament.create_rounds_for_contenders(8)
if @mash_tournament.save && (
@mash_tournament.builder.create_rounds_for_contenders(8) == 3
) && (
@mash_tournament.builder.fill_in_next_round.length == 4
)
flash[:notice] = "Let's start mashing!"
format.html { redirect_to :controller => 'mashes', :action => 'new' }
else