From 62219ac4e3af36cc15c9ad61701550bee9a8424c Mon Sep 17 00:00:00 2001
From: Luke Shumaker
Date: Sat, 26 Apr 2014 20:16:33 -0400
Subject: run ./generate.sh
---
app/controllers/games_controller.rb | 2 +-
app/controllers/tournaments_controller.rb | 2 +-
app/views/games/_form.html.erb | 4 ++++
app/views/games/index.html.erb | 2 ++
app/views/games/index.json.jbuilder | 2 +-
app/views/games/show.html.erb | 5 +++++
app/views/games/show.json.jbuilder | 2 +-
app/views/tournaments/_form.html.erb | 4 ++++
app/views/tournaments/index.html.erb | 2 ++
app/views/tournaments/index.json.jbuilder | 2 +-
app/views/tournaments/show.html.erb | 5 +++++
app/views/tournaments/show.json.jbuilder | 2 +-
12 files changed, 28 insertions(+), 6 deletions(-)
(limited to 'app')
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
index 8546efb..76a6296 100644
--- a/app/controllers/games_controller.rb
+++ b/app/controllers/games_controller.rb
@@ -69,6 +69,6 @@ class GamesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def game_params
- params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method)
+ params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method)
end
end
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 6bf79fd..64ab155 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -69,6 +69,6 @@ class TournamentsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def tournament_params
- params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method)
+ params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method)
end
end
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb
index 20cb214..b1db0b3 100644
--- a/app/views/games/_form.html.erb
+++ b/app/views/games/_form.html.erb
@@ -47,6 +47,10 @@
<%= f.label :sampling_method %>
<%= f.text_field :sampling_method %>
+
+ <%= f.label :scoring_method %>
+ <%= f.text_field :scoring_method %>
+
<%= f.submit %>
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb
index b4c3950..207a0ba 100644
--- a/app/views/games/index.html.erb
+++ b/app/views/games/index.html.erb
@@ -12,6 +12,7 @@
Set rounds |
Randomized teams |
Sampling method |
+ Scoring method |
|
|
|
@@ -30,6 +31,7 @@
<%= game.set_rounds %> |
<%= game.randomized_teams %> |
<%= game.sampling_method %> |
+ <%= game.scoring_method %> |
<%= link_to 'Show', game %> |
<%= link_to 'Edit', edit_game_path(game) %> |
<%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %> |
diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder
index 6b20f60..7964f2c 100644
--- a/app/views/games/index.json.jbuilder
+++ b/app/views/games/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@games) do |game|
- json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method
+ json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method
json.url game_url(game, format: :json)
end
diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb
index 38c8ccb..6bca111 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -45,5 +45,10 @@
<%= @game.sampling_method %>
+
+ Scoring method:
+ <%= @game.scoring_method %>
+
+
<%= link_to 'Edit', edit_game_path(@game) %> |
<%= link_to 'Back', games_path %>
diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder
index 087a156..c5fb4ed 100644
--- a/app/views/games/show.json.jbuilder
+++ b/app/views/games/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at
+json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method, :created_at, :updated_at
diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb
index 9b9681c..7127d38 100644
--- a/app/views/tournaments/_form.html.erb
+++ b/app/views/tournaments/_form.html.erb
@@ -51,6 +51,10 @@
<%= f.label :sampling_method %>
<%= f.text_field :sampling_method %>
+
+ <%= f.label :scoring_method %>
+ <%= f.text_field :scoring_method %>
+
<%= f.submit %>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
index 49a83ec..c2b5a2b 100644
--- a/app/views/tournaments/index.html.erb
+++ b/app/views/tournaments/index.html.erb
@@ -13,6 +13,7 @@
Set rounds |
Randomized teams |
Sampling method |
+ Scoring method |
|
|
|
@@ -32,6 +33,7 @@
<%= tournament.set_rounds %> |
<%= tournament.randomized_teams %> |
<%= tournament.sampling_method %> |
+ <%= tournament.scoring_method %> |
<%= link_to 'Show', tournament %> |
<%= link_to 'Edit', edit_tournament_path(tournament) %> |
<%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %> |
diff --git a/app/views/tournaments/index.json.jbuilder b/app/views/tournaments/index.json.jbuilder
index 7118ecc..bd86e04 100644
--- a/app/views/tournaments/index.json.jbuilder
+++ b/app/views/tournaments/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@tournaments) do |tournament|
- json.extract! tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method
+ json.extract! tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method
json.url tournament_url(tournament, format: :json)
end
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index d97e504..f91e11e 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -50,5 +50,10 @@
<%= @tournament.sampling_method %>
+
+ Scoring method:
+ <%= @tournament.scoring_method %>
+
+
<%= link_to 'Edit', edit_tournament_path(@tournament) %> |
<%= link_to 'Back', tournaments_path %>
diff --git a/app/views/tournaments/show.json.jbuilder b/app/views/tournaments/show.json.jbuilder
index 4542e52..ff82412 100644
--- a/app/views/tournaments/show.json.jbuilder
+++ b/app/views/tournaments/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at
+json.extract! @tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method, :created_at, :updated_at
--
cgit v1.2.3