diff options
Diffstat (limited to 'app/views/games')
-rw-r--r-- | app/views/games/_form.html.erb | 6 | ||||
-rw-r--r-- | app/views/games/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/games/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/games/show.html.erb | 5 | ||||
-rw-r--r-- | app/views/games/show.json.jbuilder | 2 |
5 files changed, 14 insertions, 3 deletions
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb index f68e28f..ef250ad 100644 --- a/app/views/games/_form.html.erb +++ b/app/views/games/_form.html.erb @@ -13,7 +13,7 @@ <div class="field"> <%= f.label :name %><br> - <%= f.text_area :name %> + <%= f.text_field :name %> </div> <div class="field"> <%= f.label :min_players_per_team %><br> @@ -39,6 +39,10 @@ <%= f.label :randomized_teams %><br> <%= f.check_box :randomized_teams %> </div> + <div class="field"> + <%= f.label :sampling_method %><br> + <%= f.text_field :sampling_method %> + </div> <div class="actions"> <%= f.submit %> </div> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index 79acd1e..abb0d8a 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -10,6 +10,7 @@ <th>Max teams per match</th> <th>Set rounds</th> <th>Randomized teams</th> + <th>Sampling method</th> <th></th> <th></th> <th></th> @@ -26,6 +27,7 @@ <td><%= game.max_teams_per_match %></td> <td><%= game.set_rounds %></td> <td><%= game.randomized_teams %></td> + <td><%= game.sampling_method %></td> <td><%= link_to 'Show', game %></td> <td><%= link_to 'Edit', edit_game_path(game) %></td> <td><%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %></td> 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 39d4a97..d731e3d 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -33,5 +33,10 @@ <%= @game.randomized_teams %> </p> +<p> + <strong>Sampling method:</strong> + <%= @game.sampling_method %> +</p> + <%= 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 |