diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-04-23 21:47:34 -0400 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-04-23 21:47:34 -0400 |
commit | 8003c0f8326f231b6e0c8bb29feb48736271ea21 (patch) | |
tree | ec0fcef385cac365f6a0f2c3f348ef8a3d65d090 /app/views | |
parent | 8010bd28db76dd5783b2be046de4c63fa27738f6 (diff) | |
parent | cfa41fcc58acc9ae50b84eb51e3d9fa9ecb3b79e (diff) |
Merge branch 'clean2'
Conflicts:
app/models/game.rb
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 abb0d8a..bcd10dd 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -3,6 +3,7 @@ <table class="table table-hover"> <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 d731e3d..1250cbd 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -1,4 +1,9 @@ <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 |