summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/matches_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb
index 23d2700..986bb44 100644
--- a/app/controllers/matches_controller.rb
+++ b/app/controllers/matches_controller.rb
@@ -1,5 +1,5 @@
class MatchesController < ApplicationController
- before_action :set_tournament, only: [:index]
+ before_action :set_tournament, only: [:index, :new, :create]
before_action :set_match, only: [:show, :edit, :update, :destroy]
# GET /matches
# GET /matches.json
@@ -72,6 +72,6 @@ class MatchesController < ApplicationController
end
# Never trust parameters from the scary internet, only allow the white list through.
def match_params
- params.require(:match).permit(:tournament_id, :name)
+ params.require(:match).permit(:tournament_id, :name, :winner_id)
end
end