diff options
author | nfoy <nfoy@purdue.edu> | 2014-03-06 20:39:05 -0500 |
---|---|---|
committer | nfoy <nfoy@purdue.edu> | 2014-03-06 20:39:05 -0500 |
commit | e10bf58ec059ec263c1d1a9dcac608475377868a (patch) | |
tree | 548a7ce8c770df6716a7be2dba57fc8038ffc702 /app/controllers | |
parent | 8e1ca0e4f9107a43fbdf0dac315e3467b0158356 (diff) |
matches routed
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/matches_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 984be3f..2d8ea5e 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -1,10 +1,10 @@ class MatchesController < ApplicationController - before_action :set_match, only: [:show, :edit, :update, :destroy] + before_action :set_match #, only: [:show, :edit, :update, :destroy] # GET /matches # GET /matches.json def index - @matches = Match.all + @matches = @tournament.matches end # GET /matches/1 @@ -14,7 +14,7 @@ class MatchesController < ApplicationController # GET /matches/new def new - @match = Match.new + end # GET /matches/1/edit @@ -64,7 +64,7 @@ class MatchesController < ApplicationController private # Use callbacks to share common setup or constraints between actions. def set_match - @match = Match.find(params[:id]) + @tournament = Tournament.find(params[:tournament_id]) end # Never trust parameters from the scary internet, only allow the white list through. |