From 6073d9c3311bc2dca5df7bc6931e7a815401c5fa Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Wed, 23 Jan 2019 20:16:48 +0000 Subject: [PATCH] Fixed matches show page --- app/controllers/matches_controller.rb | 1 + app/views/matches/show.html.erb | 64 +++++++++++---------------- 2 files changed, 28 insertions(+), 37 deletions(-) diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 9ab5a69..89f747f 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -5,6 +5,7 @@ class MatchesController < ApplicationController # GET /matches/1 # GET /matches/1.json def show + @tournament = @match.tournament end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 9905992..939a880 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -1,38 +1,28 @@ +

Bout: <%= @match.bout_number %>

+

Weight Class: <%= @match.wrestler1.weight.max %>

+ + + + + + + + -

- R: - <%= @match.w1_name %> -

- -

- G: - <%= @match.w2_name %> -

- -

- G stat: - <%= @match.g_stat %> -

- -

- R stat: - <%= @match.r_stat %> -

- -

- Winner: - <%= @match.winner_id %> -

- -

- Win type: - <%= @match.win_type %> -

- -

- Score: - <%= @match.score %> -

- -<%= link_to 'Edit', edit_match_path(@match) %> | -<%= link_to 'Back', matches_path %> + + + + + + + + + + + + + + + + +
<%= @match.wrestler1.name %> (<%= @match.wrestler1.school.name %>)<%= @match.wrestler2.name %> (<%= @match.wrestler2.school.name %>)
Stats<%= @match.w1_stat %><%= @match.w2_stat %>
Winner<%= @match.winner_name %>
Score<%= @match.score %>
\ No newline at end of file