Fix a missing route and confirm issue in gathers

This commit is contained in:
Ari Timonen 2020-04-18 08:03:27 +03:00
parent 494f341cad
commit 9a7ec83f65
2 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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