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

Added all matches page and edit matches page

This commit is contained in:
2015-12-31 20:07:14 +00:00
parent f3936b0906
commit 633c762b2e
8 changed files with 264 additions and 66 deletions

View File

@@ -16,6 +16,8 @@ class MatchesController < ApplicationController
if @match
@w1 = @match.wrestler1
@w2 = @match.wrestler2
@wrestlers = [@w1,@w2]
@tournament = @match.tournament
end
end
@@ -43,7 +45,7 @@ class MatchesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def match_params
params.require(:match).permit(:w1, :w2, :g_stat, :r_stat, :winner_id, :win_type, :score, :finished)
params.require(:match).permit(:w1, :w2, :w1_stat, :w2_stat, :winner_id, :win_type, :score, :finished)
end
def check_access