diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/matches/_form.html.erb | 4 | ||||
-rw-r--r-- | app/views/matches/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/matches/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/matches/show.html.erb | 5 | ||||
-rw-r--r-- | app/views/matches/show.json.jbuilder | 2 |
5 files changed, 13 insertions, 2 deletions
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index f1e6047..727c002 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -12,6 +12,10 @@ <% end %> <div class="field"> + <%= f.label :status %><br> + <%= f.number_field :status %> + </div> + <div class="field"> <%= f.label :tournament_id %><br> <%= f.text_field :tournament_id %> </div> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 71db08c..400efb4 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -3,6 +3,7 @@ <table> <thead> <tr> + <th>Status</th> <th>Tournament</th> <th>Name</th> <th>Winner</th> @@ -15,6 +16,7 @@ <tbody> <% @matches.each do |match| %> <tr> + <td><%= match.status %></td> <td><%= match.tournament %></td> <td><%= match.name %></td> <td><%= match.winner %></td> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder index 0b2bfcd..1a63f5f 100644 --- a/app/views/matches/index.json.jbuilder +++ b/app/views/matches/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@matches) do |match| - json.extract! match, :id, :tournament_id, :name, :winner_id + json.extract! match, :id, :status, :tournament_id, :name, :winner_id json.url match_url(match, format: :json) end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 3abb1f7..f3fc822 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -1,6 +1,11 @@ <p id="notice"><%= notice %></p> <p> + <strong>Status:</strong> + <%= @match.status %> +</p> + +<p> <strong>Tournament:</strong> <%= @match.tournament %> </p> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index fe14010..a3ef588 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :tournament_id, :name, :winner_id, :created_at, :updated_at +json.extract! @match, :id, :status, :tournament_id, :name, :winner_id, :created_at, :updated_at |