diff options
Diffstat (limited to 'app/views/games')
-rw-r--r-- | app/views/games/_form.html.erb | 37 | ||||
-rw-r--r-- | app/views/games/edit.html.erb | 6 | ||||
-rw-r--r-- | app/views/games/index.html.erb | 35 | ||||
-rw-r--r-- | app/views/games/index.json.jbuilder | 4 | ||||
-rw-r--r-- | app/views/games/new.html.erb | 5 | ||||
-rw-r--r-- | app/views/games/show.html.erb | 29 | ||||
-rw-r--r-- | app/views/games/show.json.jbuilder | 1 |
7 files changed, 0 insertions, 117 deletions
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb deleted file mode 100644 index 8941c59..0000000 --- a/app/views/games/_form.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -<%= form_for(@game) do |f| %> - <% if @game.errors.any? %> - <div id="error_explanation"> - <h2><%= pluralize(@game.errors.count, "error") %> prohibited this game from being saved:</h2> - - <ul> - <% @game.errors.full_messages.each do |msg| %> - <li><%= msg %></li> - <% end %> - </ul> - </div> - <% end %> - - <div class="field"> - <%= f.label :name %><br> - <%= f.text_area :name %> - </div> - <div class="field"> - <%= f.label :players_per_team %><br> - <%= f.number_field :players_per_team %> - </div> - <div class="field"> - <%= f.label :teams_per_match %><br> - <%= f.number_field :teams_per_match %> - </div> - <div class="field"> - <%= f.label :set_rounds %><br> - <%= f.number_field :set_rounds %> - </div> - <div class="field"> - <%= f.label :randomized_teams %><br> - <%= f.number_field :randomized_teams %> - </div> - <div class="actions"> - <%= f.submit %> - </div> -<% end %> diff --git a/app/views/games/edit.html.erb b/app/views/games/edit.html.erb deleted file mode 100644 index d72bd2e..0000000 --- a/app/views/games/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<h1>Editing game</h1> - -<%= render 'form' %> - -<%= link_to 'Show', @game %> | -<%= link_to 'Back', games_path %> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb deleted file mode 100644 index ccd0f63..0000000 --- a/app/views/games/index.html.erb +++ /dev/null @@ -1,35 +0,0 @@ -<h1>Listing games</h1> - -<table> - <thead> - <tr> - <th>Name</th> - <th>Players per team</th> - <th>Teams per match</th> - <th>Set rounds</th> - <th>Randomized teams</th> - <th></th> - <th></th> - <th></th> - </tr> - </thead> - - <tbody> - <% @games.each do |game| %> - <tr> - <td><%= game.name %></td> - <td><%= game.players_per_team %></td> - <td><%= game.teams_per_match %></td> - <td><%= game.set_rounds %></td> - <td><%= game.randomized_teams %></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> - </tr> - <% end %> - </tbody> -</table> - -<br> - -<%= link_to 'New Game', new_game_path %> diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder deleted file mode 100644 index 7e5c1a1..0000000 --- a/app/views/games/index.json.jbuilder +++ /dev/null @@ -1,4 +0,0 @@ -json.array!(@games) do |game| - json.extract! game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams - json.url game_url(game, format: :json) -end diff --git a/app/views/games/new.html.erb b/app/views/games/new.html.erb deleted file mode 100644 index ab95f70..0000000 --- a/app/views/games/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<h1>New game</h1> - -<%= render 'form' %> - -<%= link_to 'Back', games_path %> diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb deleted file mode 100644 index 7986016..0000000 --- a/app/views/games/show.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<p id="notice"><%= notice %></p> - -<p> - <strong>Name:</strong> - <%= @game.name %> -</p> - -<p> - <strong>Players per team:</strong> - <%= @game.players_per_team %> -</p> - -<p> - <strong>Teams per match:</strong> - <%= @game.teams_per_match %> -</p> - -<p> - <strong>Set rounds:</strong> - <%= @game.set_rounds %> -</p> - -<p> - <strong>Randomized teams:</strong> - <%= @game.randomized_teams %> -</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 deleted file mode 100644 index 1a2d0c7..0000000 --- a/app/views/games/show.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.extract! @game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at |