From f4059009ba24934e9b2a300ddd9586ba71dddfe5 Mon Sep 17 00:00:00 2001 From: vagrant Date: Fri, 6 Feb 2015 03:01:17 +0000 Subject: [PATCH] Created bracket and extra flag for wrestler --- app/controllers/static_pages_controller.rb | 1 + app/views/static_pages/_bracket.html.erb | 125 ++++++++++++++++++ app/views/static_pages/_fourPool.html.erb | 7 +- app/views/wrestlers/_form.html.erb | 6 +- ...50206025407_add_extra_flag_for_wrestler.rb | 5 + db/schema.rb | 3 +- 6 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 app/views/static_pages/_bracket.html.erb create mode 100644 db/migrate/20150206025407_add_extra_flag_for_wrestler.rb diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index ac6f381..86ae360 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -22,6 +22,7 @@ class StaticPagesController < ApplicationController end def brackets + if params[:weight] @weight = Weight.find(params[:weight]) @tournament = Tournament.find(@weight.tournament_id) diff --git a/app/views/static_pages/_bracket.html.erb b/app/views/static_pages/_bracket.html.erb new file mode 100644 index 0000000..a532441 --- /dev/null +++ b/app/views/static_pages/_bracket.html.erb @@ -0,0 +1,125 @@ + + + +
Bracket After Pool
+
+ + + + +
\ No newline at end of file diff --git a/app/views/static_pages/_fourPool.html.erb b/app/views/static_pages/_fourPool.html.erb index 91d51fb..b16679d 100644 --- a/app/views/static_pages/_fourPool.html.erb +++ b/app/views/static_pages/_fourPool.html.erb @@ -87,4 +87,9 @@ <% end %> - \ No newline at end of file + + + +
+
+<%= render 'bracket' %> \ No newline at end of file diff --git a/app/views/wrestlers/_form.html.erb b/app/views/wrestlers/_form.html.erb index 3e54f86..fde20b0 100644 --- a/app/views/wrestlers/_form.html.erb +++ b/app/views/wrestlers/_form.html.erb @@ -46,7 +46,11 @@ <%= f.label "Seed Criteria" %>
<%= f.text_field :criteria %> - +
+ <%= f.label "Check box if extra" %> <%= f.check_box :extra %> +
+
+
<%= f.submit %>
diff --git a/db/migrate/20150206025407_add_extra_flag_for_wrestler.rb b/db/migrate/20150206025407_add_extra_flag_for_wrestler.rb new file mode 100644 index 0000000..4aef264 --- /dev/null +++ b/db/migrate/20150206025407_add_extra_flag_for_wrestler.rb @@ -0,0 +1,5 @@ +class AddExtraFlagForWrestler < ActiveRecord::Migration + def change + add_column :wrestlers, :extra, :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index b56cce8..d9bc401 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150202180900) do +ActiveRecord::Schema.define(version: 20150206025407) do create_table "matches", force: true do |t| t.integer "r_id" @@ -90,6 +90,7 @@ ActiveRecord::Schema.define(version: 20150202180900) do t.integer "season_loss" t.string "criteria" t.integer "poolNumber" + t.boolean "extra" end end