From 07476fd9a2b942e8d6056804bb1cdbd5e9a1c528 Mon Sep 17 00:00:00 2001
From: Luke Shumaker
- <%= f.text_area :name %>
+ <%= f.text_field :name %>
@@ -39,6 +39,10 @@
<%= f.label :randomized_teams %>
<%= f.check_box :randomized_teams %>
+ <%= f.text_field :sampling_method %>
+ Max teams per match
Set rounds
Randomized teams
+ Sampling method
@@ -26,6 +27,7 @@
<%= game.max_teams_per_match %>
<%= game.set_rounds %>
<%= game.randomized_teams %>
+ <%= game.sampling_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 f8b3e96..cc0afc9 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, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams
+ json.extract! game, :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.url game_url(game, format: :json)
end
diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb
index 1f1a154..93bfb60 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -35,5 +35,10 @@
<%= @game.randomized_teams %>
+ Sampling method: + <%= @game.sampling_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 e689e7b..60d0a4a 100644 --- a/app/views/games/show.json.jbuilder +++ b/app/views/games/show.json.jbuilder @@ -1 +1 @@ -json.extract! @game, :id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at +json.extract! @game, :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 diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index bb33501..65069d1 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -16,8 +16,8 @@ <%= f.number_field :status %>- Tournament: - <%= @match.tournament %> + Tournament stage: + <%= @match.tournament_stage %>
diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index 37496c9..5b543ea 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :status, :tournament_id, :name, :winner_id, :remote_id, :submitted_peer_evaluations, :created_at, :updated_at +json.extract! @match, :id, :status, :tournament_stage_id, :name, :winner_id, :remote_id, :submitted_peer_evaluations, :created_at, :updated_at diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb index 38855a0..9b9681c 100644 --- a/app/views/tournaments/_form.html.erb +++ b/app/views/tournaments/_form.html.erb @@ -11,10 +11,6 @@ <% end %> -
Name | Game | Status | +Name | Min players per team | Max players per team | Min teams per match | Max teams per match | Set rounds | Randomized teams | +Sampling method | @@ -21,15 +22,16 @@ | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%= tournament.name %> | <%= tournament.game %> | <%= tournament.status %> | +<%= tournament.name %> | <%= tournament.min_players_per_team %> | <%= tournament.max_players_per_team %> | <%= tournament.min_teams_per_match %> | <%= tournament.max_teams_per_match %> | <%= tournament.set_rounds %> | <%= tournament.randomized_teams %> | +<%= tournament.sampling_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 4038f04..7118ecc 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, :name, :game_id, :status, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams + 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.url tournament_url(tournament, format: :json) end diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb index 3cb6179..d97e504 100644 --- a/app/views/tournaments/show.html.erb +++ b/app/views/tournaments/show.html.erb @@ -1,10 +1,5 @@