diff options
Diffstat (limited to 'app/controllers/matches_controller.rb')
-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. |