diff --git a/app/controllers/match_proposals_controller.rb b/app/controllers/match_proposals_controller.rb index 6079786..79e5773 100644 --- a/app/controllers/match_proposals_controller.rb +++ b/app/controllers/match_proposals_controller.rb @@ -1,6 +1,6 @@ class MatchProposalsController < ApplicationController def index - + @match = Match.find(params[:match_id]) end def new diff --git a/app/models/match.rb b/app/models/match.rb index 4626848..82495a0 100755 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -42,6 +42,7 @@ class Match < ActiveRecord::Base has_many :users, through: :matchers has_many :predictions, dependent: :destroy has_many :comments, as: :commentable, order: "created_at", dependent: :destroy + has_many :match_proposals, inverse_of: :match, dependent: :destroy belongs_to :challenge belongs_to :contest belongs_to :contester1, class_name: "Contester", include: "team" diff --git a/app/views/match_proposals/index.html.erb b/app/views/match_proposals/index.html.erb index feb7985..726f1da 100644 --- a/app/views/match_proposals/index.html.erb +++ b/app/views/match_proposals/index.html.erb @@ -1,2 +1,24 @@ -
Find me in app/views/match_proposals/show.html.erb
+Team | +Time | +Status | +Actions | +
---|---|---|---|
<%= proposal.team.name %> | +<%= longtime proposal.proposed_time %> | +<%= proposal.status %> | +test | +
<%= @match.report.html_safe %>
<% end %> + <% if cuser and (cuser.admin? or @match.of_user cuser) %> +