summaryrefslogtreecommitdiff
path: root/app/views/matches
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-02-18 20:42:51 -0500
committerAndrewMurrell <amurrel@purdue.edu>2014-02-18 20:42:51 -0500
commit96b97d691f6889004c38bef15411bc27e448fda1 (patch)
tree7105a54b40fc11ca38a67ff2f520cc977532da44 /app/views/matches
parent1b95d76d2bded709f512ccdca851388b8691708f (diff)
Changes to generate.sh
Diffstat (limited to 'app/views/matches')
-rw-r--r--app/views/matches/_form.html.erb4
-rw-r--r--app/views/matches/index.html.erb2
-rw-r--r--app/views/matches/index.json.jbuilder2
-rw-r--r--app/views/matches/show.html.erb5
-rw-r--r--app/views/matches/show.json.jbuilder2
5 files changed, 13 insertions, 2 deletions
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb
index c772c7f..7d0a371 100644
--- a/app/views/matches/_form.html.erb
+++ b/app/views/matches/_form.html.erb
@@ -11,6 +11,10 @@
</div>
<% end %>
+ <div class="field">
+ <%= f.label :tournament %><br>
+ <%= f.text_field :tournament %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
index 22ae41e..d8122ac 100644
--- a/app/views/matches/index.html.erb
+++ b/app/views/matches/index.html.erb
@@ -3,6 +3,7 @@
<table>
<thead>
<tr>
+ <th>Tournament</th>
<th></th>
<th></th>
<th></th>
@@ -12,6 +13,7 @@
<tbody>
<% @matches.each do |match| %>
<tr>
+ <td><%= match.tournament %></td>
<td><%= link_to 'Show', match %></td>
<td><%= link_to 'Edit', edit_match_path(match) %></td>
<td><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder
index 08daa52..0839c83 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
+ json.extract! match, :id, :tournament
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 453985b..7bab721 100644
--- a/app/views/matches/show.html.erb
+++ b/app/views/matches/show.html.erb
@@ -1,4 +1,9 @@
<p id="notice"><%= notice %></p>
+<p>
+ <strong>Tournament:</strong>
+ <%= @match.tournament %>
+</p>
+
<%= link_to 'Edit', edit_match_path(@match) %> |
<%= link_to 'Back', matches_path %>
diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder
index 7190e4c..a381f65 100644
--- a/app/views/matches/show.json.jbuilder
+++ b/app/views/matches/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @match, :id, :created_at, :updated_at
+json.extract! @match, :id, :tournament, :created_at, :updated_at