diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb
index fb659e9..121f864 100644
--- a/app/controllers/static_pages_controller.rb
+++ b/app/controllers/static_pages_controller.rb
@@ -52,6 +52,7 @@ class StaticPagesController < ApplicationController
end
if @tournament
@weights = Weight.where(tournament_id: @tournament.id)
+ @weights = @weights.sort_by{|x|[x.max]}
end
end
diff --git a/app/models/weight.rb b/app/models/weight.rb
index cf133f5..088b215 100644
--- a/app/models/weight.rb
+++ b/app/models/weight.rb
@@ -22,9 +22,9 @@ class Weight < ActiveRecord::Base
@wrestlers = Wrestler.where(weight_id: self.id)
if @wrestlers.size <= 6
self.pools = 1
- elsif (@wrestlers.size > 6) && (@wrestlers.size <= 8)
+ elsif (@wrestlers.size > 6) && (@wrestlers.size <= 10)
self.pools = 2
- elsif (@wrestlers.size > 8) && (@wrestlers.size <= 16)
+ elsif (@wrestlers.size > 10) && (@wrestlers.size <= 16)
self.pools = 4
end
end
diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb
index 1f89ea4..c252f50 100644
--- a/app/views/schools/show.html.erb
+++ b/app/views/schools/show.html.erb
@@ -49,7 +49,9 @@
| <%= wrestler.name %> |
<%= Weight.find(wrestler.weight_id).max %> |
- <%= wrestler.original_seed %> |
+
+ <%= wrestler.original_seed %>
+ |
<%= wrestler.season_win %>-<%= wrestler.season_loss %> |
<%= wrestler.criteria %> Win <%= wrestler.seasonWinPercentage %>% |
<% if wrestler.extra? == true %>
diff --git a/app/views/static_pages/_fourPool.html.erb b/app/views/static_pages/_fourPool.html.erb
index 2dc9b0b..2315440 100644
--- a/app/views/static_pages/_fourPool.html.erb
+++ b/app/views/static_pages/_fourPool.html.erb
@@ -12,7 +12,7 @@
<% @poolOneWrestlers.each do |w| %>
|
| <%= w.name %> <%= w.season_win %>-<%= w.season_loss %> <%= w.school.name %> |
- <%= w.boutByRound(1) %> Result |
+ <%= w.boutByRound(1) %>
|
<%= w.boutByRound(2) %> |
<%= w.boutByRound(3) %> |
@@ -35,7 +35,7 @@
<% @poolTwoWrestlers.each do |w| %>
| <%= w.name %> <%= w.season_win %>-<%= w.season_loss %> <%= w.school.name %> |
- <%= w.boutByRound(1) %> Result |
+ <%= w.boutByRound(1) %>
|
<%= w.boutByRound(2) %> |
<%= w.boutByRound(3) %> |
diff --git a/app/views/static_pages/_twoPool.html.erb b/app/views/static_pages/_twoPool.html.erb
index 8290b2a..79555db 100644
--- a/app/views/static_pages/_twoPool.html.erb
+++ b/app/views/static_pages/_twoPool.html.erb
@@ -6,15 +6,17 @@
R1 |
R2 |
R3 |
+ R4 |
<% @poolOneWrestlers.each do |w| %>
| <%= w.name %> <%= w.season_win %>-<%= w.season_loss %> <%= w.school.name %> |
- <%= w.boutByRound(1) %> Result |
+ <%= w.boutByRound(1) %>
|
<%= w.boutByRound(2) %> |
<%= w.boutByRound(3) %> |
+ <%= w.boutByRound(4) %> |
<% end %>
@@ -34,7 +36,7 @@
<% @poolTwoWrestlers.each do |w| %>
| <%= w.name %> <%= w.season_win %>-<%= w.season_loss %> <%= w.school.name %> |
- <%= w.boutByRound(1) %> Result |
+ <%= w.boutByRound(1) %>
|
<%= w.boutByRound(2) %> |
<%= w.boutByRound(3) %> |
diff --git a/app/views/weights/show.html.erb b/app/views/weights/show.html.erb
index 85ca098..f3823a2 100644
--- a/app/views/weights/show.html.erb
+++ b/app/views/weights/show.html.erb
@@ -28,7 +28,13 @@
| <%= wrestler.name %> |
<%= School.find(wrestler.school_id).name %> |
- <%= wrestler.original_seed %> |
+
+ <% if user_signed_in? %>
+ <%= wrestler.original_seed %>
+ <% else %>
+ <%= wrestler.original_seed %>
+ <% end %>
+ |
<%= wrestler.season_win %>-<%= wrestler.season_loss %> |
<%= wrestler.criteria %> Win <%= wrestler.seasonWinPercentage %>% |
<% if wrestler.extra? == true %>
@@ -49,3 +55,5 @@
+
+
diff --git a/config/routes.rb b/config/routes.rb
index 09ef9c1..1e13fd5 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -30,6 +30,7 @@ Wrestling::Application.routes.draw do
get 'static_pages/results'
get 'static_pages/team_scores'
+
# Example of regular route:
# get 'products/:id' => 'catalog#view'
|