From 9a7ec83f6524611a48d78954253e0f39aa442bb1 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Sat, 18 Apr 2020 08:03:27 +0300 Subject: [PATCH] Fix a missing route and confirm issue in gathers --- app/models/gatherer.rb | 2 +- config/routes.rb | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/models/gatherer.rb b/app/models/gatherer.rb index 3d418f4..e507d9e 100644 --- a/app/models/gatherer.rb +++ b/app/models/gatherer.rb @@ -171,6 +171,6 @@ class Gatherer < ActiveRecord::Base end def self.params(params, cuser) - params.require(:gatherer).permit(:status, :username, :user_id, :gather_id, :team, :votes) + params.require(:gatherer).permit(:status, :username, :user_id, :gather_id, :team, :votes, :confirm) end end diff --git a/config/routes.rb b/config/routes.rb index 9507d54..a8dfe6f 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -49,12 +49,16 @@ Rails.application.routes.draw do post :pick end end - get 'gathers/latest/:game', to: "gathers#latest", via: :get - get 'gather', to: "gathers#latest", game: "ns2", via: :get - get 'gatherers/:id/status', to: "gatherers#status", via: :post + resources :gatherers do + member do + post :status + end + end + + get 'gathers/latest/:game', to: "gathers#latest" + get 'gather', to: "gathers#latest", game: "ns2" - resources :gatherers resources :groups resources :groupers resources :forumers