From cfa41fcc58acc9ae50b84eb51e3d9fa9ecb3b79e Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Wed, 23 Apr 2014 21:45:40 -0400 Subject: run ./generate.sh --- app/views/games/_form.html.erb | 4 ++++ app/views/games/index.html.erb | 2 ++ app/views/games/index.json.jbuilder | 2 +- app/views/games/show.html.erb | 5 +++++ app/views/games/show.json.jbuilder | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) (limited to 'app/views/games') 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 @@ -11,6 +11,10 @@ <% end %> +
+ <%= f.label :parent_id %>
+ <%= f.text_field :parent_id %> +
<%= f.label :name %>
<%= f.text_field :name %> 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 @@ + @@ -20,6 +21,7 @@ <% @games.each do |game| %> + 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,5 +1,10 @@

<%= notice %>

+

+ Parent: + <%= @game.parent %> +

+

Name: <%= @game.name %> 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 -- cgit v1.2.3-54-g00ecf

Parent Name Min players per team Max players per team
<%= game.parent %> <%= game.name %> <%= game.min_players_per_team %> <%= game.max_players_per_team %>