1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-13 17:18:58 +00:00

Cleaning up views and controllers

This commit is contained in:
2015-11-04 07:10:20 -05:00
parent 3695800001
commit a38c959d0c
9 changed files with 32 additions and 31 deletions

View File

@@ -11,11 +11,11 @@ class MatchesController < ApplicationController
# GET /matches/1/edit
def edit
if params[:match]
@match = Match.find (params[:match])
@match = Match.where(:id => params[:match]).includes(:wrestlers).first
end
if @match
@w1 = Wrestler.find(@match.w1)
@w2 = Wrestler.find(@match.w2)
@w1 = @match.wrestler1
@w2 = @match.wrestler2
end
end