diff options
author | AndrewMurrell <amurrel@purdue.edu> | 2014-04-07 04:16:18 -0400 |
---|---|---|
committer | AndrewMurrell <amurrel@purdue.edu> | 2014-04-07 04:16:18 -0400 |
commit | c3af0f5b51dfe842ad9e4c5ea93e202e26e818ac (patch) | |
tree | c22f1cc916d98c7271635ecae48b62e8ea128012 /app | |
parent | 8e7ca204ab9a702be483621f4fe9df68b03ffec0 (diff) |
Ran generate.sh
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/matches_controller.rb | 2 | ||||
-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 |
6 files changed, 14 insertions, 3 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 32108d9..968bb1e 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -69,6 +69,6 @@ class MatchesController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def match_params - params.require(:match).permit(:status, :tournament_id, :name, :winner_id, :remote_id) + params.require(:match).permit(:status, :tournament_id, :name, :winner_id, :remote_id, :submitted_peer_evaluations) end end diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index 9fe255c..bb33501 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -31,6 +31,10 @@ <%= f.label :remote_id %><br> <%= f.text_field :remote_id %> </div> + <div class="field"> + <%= f.label :submitted_peer_evaluations %><br> + <%= f.number_field :submitted_peer_evaluations %> + </div> <div class="actions"> <%= f.submit %> </div> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 8d699f9..7b7676a 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -8,6 +8,7 @@ <th>Name</th> <th>Winner</th> <th>Remote</th> + <th>Submitted peer evaluations</th> <th></th> <th></th> <th></th> @@ -22,6 +23,7 @@ <td><%= match.name %></td> <td><%= match.winner %></td> <td><%= match.remote_id %></td> + <td><%= match.submitted_peer_evaluations %></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 18f172d..8efb8f9 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, :status, :tournament_id, :name, :winner_id, :remote_id + json.extract! match, :id, :status, :tournament_id, :name, :winner_id, :remote_id, :submitted_peer_evaluations 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 1ee7f1d..1164113 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -25,5 +25,10 @@ <%= @match.remote_id %> </p> +<p> + <strong>Submitted peer evaluations:</strong> + <%= @match.submitted_peer_evaluations %> +</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 bfd2be4..37496c9 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :status, :tournament_id, :name, :winner_id, :remote_id, :created_at, :updated_at +json.extract! @match, :id, :status, :tournament_id, :name, :winner_id, :remote_id, :submitted_peer_evaluations, :created_at, :updated_at |