From 62219ac4e3af36cc15c9ad61701550bee9a8424c Mon Sep 17 00:00:00 2001
From: Luke Shumaker
<%= f.text_field :sampling_method %>
+
+ <%= f.text_field :scoring_method %>
+ 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 %>+ 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-54-g00ecf