tournament 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/lib/tournament.rb +1 -1
- data/webgui/app/controllers/admin_controller.rb +4 -1
- data/webgui/app/models/pool.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/tournament.rb
CHANGED
@@ -62,7 +62,10 @@ class AdminController < ApplicationController
|
|
62
62
|
pool = Pool.find(params[:id])
|
63
63
|
# This is confusing ...
|
64
64
|
@pool = pool.pool
|
65
|
-
@entry = Entry.
|
65
|
+
@entry = Entry.find_or_initialize_by_user_id_and_pool_id(current_user.id, pool.id) do |e|
|
66
|
+
e.tie_break = 0
|
67
|
+
e.name = 'Tournament Bracket'
|
68
|
+
end
|
66
69
|
@entry.bracket
|
67
70
|
@entry.save(false)
|
68
71
|
|
data/webgui/app/models/pool.rb
CHANGED
@@ -67,7 +67,7 @@ class Pool < ActiveRecord::Base
|
|
67
67
|
end
|
68
68
|
(0..3).each {|n| reg_ret[n] ||= ['', Array.new(16)]}
|
69
69
|
|
70
|
-
self.seedings.
|
70
|
+
self.seedings.each do |t|
|
71
71
|
region = reg_ret.find {|name, teams| name == t.region} || reg_ret.find {|name, teams| name.blank?}
|
72
72
|
region[0] = t.region
|
73
73
|
region[1][t.seed-1] = t.team
|