1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Updated views for matches

This commit is contained in:
2015-09-11 13:19:45 -04:00
parent 06635f3d46
commit 052eb1dd95
4 changed files with 11 additions and 13 deletions

View File

@@ -27,8 +27,8 @@ class MatchesController < ApplicationController
@match = Match.find (params[:match])
end
if @match
@w1 = Wrestler.find(@match.r_id)
@w2 = Wrestler.find(@match.g_id)
@w1 = Wrestler.find(@match.w1)
@w2 = Wrestler.find(@match.w2)
end
end
@@ -92,6 +92,6 @@ class MatchesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def match_params
params.require(:match).permit(:r_id, :g_id, :g_stat, :r_stat, :winner_id, :win_type, :score, :finished)
params.require(:match).permit(:w1, :w2, :g_stat, :r_stat, :winner_id, :win_type, :score, :finished)
end
end