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
@@ -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-2-g168b