From c9f2abad7b9c967e23ed2b2867d426eb27f61387 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 6 Mar 2014 21:29:24 -0500 Subject: make the join tables not have models --- app/views/tournaments/_form.html.erb | 8 ++++---- app/views/tournaments/index.html.erb | 4 ++-- app/views/tournaments/index.json.jbuilder | 2 +- app/views/tournaments/show.html.erb | 10 +++++----- app/views/tournaments/show.json.jbuilder | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'app/views/tournaments') diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb index c2c0ba7..d098cbb 100644 --- a/app/views/tournaments/_form.html.erb +++ b/app/views/tournaments/_form.html.erb @@ -15,6 +15,10 @@ <%= f.label :game_id %>
<%= f.text_field :game_id %> +
+ <%= f.label :status %>
+ <%= f.number_field :status %> +
<%= f.label :min_players_per_team %>
<%= f.number_field :min_players_per_team %> @@ -39,10 +43,6 @@ <%= f.label :randomized_teams %>
<%= f.check_box :randomized_teams %>
-
- <%= f.label :status %>
- <%= f.number_field :status %> -
<%= f.submit %>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb index dec16d1..fb8b381 100644 --- a/app/views/tournaments/index.html.erb +++ b/app/views/tournaments/index.html.erb @@ -4,13 +4,13 @@ Game + Status Min players per team Max players per team Min teams per match Max teams per match Set rounds Randomized teams - Status @@ -21,13 +21,13 @@ <% @tournaments.each do |tournament| %> <%= tournament.game %> + <%= tournament.status %> <%= tournament.min_players_per_team %> <%= tournament.max_players_per_team %> <%= tournament.min_teams_per_match %> <%= tournament.max_teams_per_match %> <%= tournament.set_rounds %> <%= tournament.randomized_teams %> - <%= tournament.status %> <%= link_to 'Show', tournament %> <%= link_to 'Edit', edit_tournament_path(tournament) %> <%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %> diff --git a/app/views/tournaments/index.json.jbuilder b/app/views/tournaments/index.json.jbuilder index df8eee4..e95c6a7 100644 --- a/app/views/tournaments/index.json.jbuilder +++ b/app/views/tournaments/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@tournaments) do |tournament| - json.extract! tournament, :id, :game_id, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :status + json.extract! tournament, :id, :game_id, :status, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams json.url tournament_url(tournament, format: :json) end diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb index 355bc90..208c6f4 100644 --- a/app/views/tournaments/show.html.erb +++ b/app/views/tournaments/show.html.erb @@ -5,6 +5,11 @@ <%= @tournament.game %>

+

+ Status: + <%= @tournament.status %> +

+

Min players per team: <%= @tournament.min_players_per_team %> @@ -35,10 +40,5 @@ <%= @tournament.randomized_teams %>

-

- Status: - <%= @tournament.status %> -

- <%= link_to 'Edit', edit_tournament_path(@tournament) %> | <%= link_to 'Back', tournaments_path %> diff --git a/app/views/tournaments/show.json.jbuilder b/app/views/tournaments/show.json.jbuilder index 7bedd4b..de2fbe0 100644 --- a/app/views/tournaments/show.json.jbuilder +++ b/app/views/tournaments/show.json.jbuilder @@ -1 +1 @@ -json.extract! @tournament, :id, :game_id, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :status, :created_at, :updated_at +json.extract! @tournament, :id, :game_id, :status, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at -- cgit v1.2.3-2-g168b