diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/games/_form.html.erb | 4 | ||||
-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, 13 insertions, 2 deletions
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb index ef250ad..20cb214 100644 --- a/app/views/games/_form.html.erb +++ b/app/views/games/_form.html.erb @@ -12,6 +12,10 @@ <% end %> <div class="field"> + <%= f.label :parent_id %><br> + <%= f.text_field :parent_id %> + </div> + <div class="field"> <%= f.label :name %><br> <%= f.text_field :name %> </div> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index 6cc7f58..b4c3950 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -3,6 +3,7 @@ <table> <thead> <tr> + <th>Parent</th> <th>Name</th> <th>Min players per team</th> <th>Max players per team</th> @@ -20,6 +21,7 @@ <tbody> <% @games.each do |game| %> <tr> + <td><%= game.parent %></td> <td><%= game.name %></td> <td><%= game.min_players_per_team %></td> <td><%= game.max_players_per_team %></td> diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder index cc0afc9..6b20f60 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, :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 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 93bfb60..38c8ccb 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -1,6 +1,11 @@ <p id="notice"><%= notice %></p> <p> + <strong>Parent:</strong> + <%= @game.parent %> +</p> + +<p> <strong>Name:</strong> <%= @game.name %> </p> diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder index 60d0a4a..087a156 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, :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, :created_at, :updated_at |