diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index d83690e..952ba68 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -2,4 +2,5 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
+
end
diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb
index 468c632..70315dc 100644
--- a/app/controllers/static_pages_controller.rb
+++ b/app/controllers/static_pages_controller.rb
@@ -316,6 +316,8 @@ class StaticPagesController < ApplicationController
end
end
+
+
diff --git a/app/models/match.rb b/app/models/match.rb
index f5f8ffb..ff698b5 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -1,4 +1,10 @@
class Match < ActiveRecord::Base
belongs_to :tournament
WIN_TYPES = ["Decision", "Major", "Tech Fall", "Pin", "Forfeit", "Injury Default", "Default"]
+
+ def bout
+ @round_number = self.round * 1000
+
+ self.bout_number = @round_number + self.id
+ end
end
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index 93f4ed5..43e7045 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -2,5 +2,5 @@ class Tournament < ActiveRecord::Base
has_many :schools, dependent: :destroy
has_many :weights, dependent: :destroy
has_many :matches, dependent: :destroy
- has_many :mats, dependent: :destroy
+ has_many :mats, dependent: :destroy
end
diff --git a/app/views/static_pages/_man11.html.erb b/app/views/static_pages/_man11.html.erb
new file mode 100644
index 0000000..8ec8beb
--- /dev/null
+++ b/app/views/static_pages/_man11.html.erb
@@ -0,0 +1,155 @@
+
+
Pool 1
+
+
+
+ | Name |
+ R1 |
+ R2 |
+ R3 |
+
+
+
+
+ | 1. <%= @seed1.name %> <%= @seed1.season_win %>-<%= @seed1.season_loss %> <%= School.find(@seed1.school_id).name %> |
+ BYE |
+ V3 |
+ V4 |
+
+
+ | 2. BYE |
+ V1 |
+ V4 |
+ V3 |
+
+
+ | 3. <%= @seed11.name %> <%= @seed11.season_win %>-<%= @seed11.season_loss %> <%= School.find(@seed11.school_id).name %> |
+ V4 |
+ V1 |
+ BYE |
+
+
+ | 4. <%= @seed8.name %> <%= @seed8.season_win %>-<%= @seed8.season_loss %> <%= School.find(@seed8.school_id).name %> |
+ V3 |
+ BYE |
+ V1 |
+
+
+
+
+
+Pool 2
+
+
+
+ | Name |
+ R1 |
+ R2 |
+ R3 |
+
+
+
+
+ | 5. <%= @seed2.name %> <%= @seed2.season_win %>-<%= @seed2.season_loss %> <%= School.find(@seed2.school_id).name %> |
+ BYE |
+ BYE |
+ V8 |
+
+
+ | 6. BYE |
+ V6 |
+ V8 |
+ V7 |
+
+
+ | 7. BYE |
+ V8 |
+ V5 |
+ BYE |
+
+
+ | 8. <%= @seed7.name %> <%= @seed7.season_win %>-<%= @seed7.season_loss %> <%= School.find(@seed7.school_id).name %> |
+ BYE |
+ BYE |
+ V5 |
+
+
+
+Pool 3
+
+
+
+ | Name |
+ R1 |
+ R2 |
+ R3 |
+
+
+
+
+ | 9. <%= @seed3.name %> <%= @seed3.season_win %>-<%= @seed3.season_loss %> <%= School.find(@seed3.school_id).name %> |
+ BYE |
+ V11 |
+ V12 |
+
+
+ | 10. BYE |
+ V9 |
+ V12 |
+ V11 |
+
+
+ | 11. <%= @seed10.name %> <%= @seed10.season_win %>-<%= @seed10.season_loss %> <%= School.find(@seed10.school_id).name %> |
+ V12 |
+ V9 |
+ BYE |
+
+
+ | 12. <%= @seed6.name %> <%= @seed6.season_win %>-<%= @seed6.season_loss %> <%= School.find(@seed6.school_id).name %> |
+ V11 |
+ BYE |
+ V9 |
+
+
+
+
+
+Pool 4
+
+
+
+ | Name |
+ R1 |
+ R2 |
+ R3 |
+
+
+
+
+ | 13. <%= @seed4.name %> <%= @seed4.season_win %>-<%= @seed4.season_loss %> <%= School.find(@seed4.school_id).name %> |
+ BYE |
+ V15 |
+ V16 |
+
+
+ | 14. BYE |
+ V13 |
+ V16 |
+ V15 |
+
+
+ | 15. <%= @seed9.name %> <%= @seed9.season_win %>-<%= @seed9.season_loss %> <%= School.find(@seed9.school_id).name %> |
+ V16 |
+ V13 |
+ BYE |
+
+
+ | 16. <%= @seed5.name %> <%= @seed5.season_win %>-<%= @seed5.season_loss %> <%= School.find(@seed5.school_id).name %> |
+ V15 |
+ BYE |
+ V13 |
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/static_pages/brackets.html.erb b/app/views/static_pages/brackets.html.erb
index a5498c2..618e169 100644
--- a/app/views/static_pages/brackets.html.erb
+++ b/app/views/static_pages/brackets.html.erb
@@ -30,4 +30,6 @@
<%= render 'man13' %>
<% elsif @bracket_size == 12 %>
<%= render 'man12' %>
+<% elsif @bracket_size == 11 %>
+ <%= render 'man11' %>
<% end %>
\ No newline at end of file