From c3af0f5b51dfe842ad9e4c5ea93e202e26e818ac Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 7 Apr 2014 04:16:18 -0400 Subject: Ran generate.sh --- app/controllers/matches_controller.rb | 2 +- app/views/matches/_form.html.erb | 4 ++++ app/views/matches/index.html.erb | 2 ++ app/views/matches/index.json.jbuilder | 2 +- app/views/matches/show.html.erb | 5 +++++ app/views/matches/show.json.jbuilder | 2 +- 6 files changed, 14 insertions(+), 3 deletions(-) (limited to 'app') 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 %>
<%= f.text_field :remote_id %> +
+ <%= f.label :submitted_peer_evaluations %>
+ <%= f.number_field :submitted_peer_evaluations %> +
<%= f.submit %>
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 @@ Name Winner Remote + Submitted peer evaluations @@ -22,6 +23,7 @@ <%= match.name %> <%= match.winner %> <%= match.remote_id %> + <%= match.submitted_peer_evaluations %> <%= link_to 'Show', match %> <%= link_to 'Edit', edit_match_path(match) %> <%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %> 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 %>

+

+ Submitted peer evaluations: + <%= @match.submitted_peer_evaluations %> +

+ <%= 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 -- cgit v1.2.3-2-g168b