Allow tournament owners to confirm games on behalf of users#50
Allow tournament owners to confirm games on behalf of users#50gando001 wants to merge 1 commit intoproglottis:masterfrom
Conversation
aa7cb71 to
ea4e8c6
Compare
proglottis
left a comment
There was a problem hiding this comment.
Hey. This is cool! But I think the feature would be better placed as a "Create confirmed game" feature, rather than confirming an already created game. Perhaps a checkbox that only appears for tournament owners.
| confirmed = 0 | ||
| game_ranks.each do |game_rank| | ||
| game_rank.confirm if game_rank.user == user | ||
| game_rank.confirm if game_rank.user == current_user || tournament.owner == current_user |
There was a problem hiding this comment.
Games are setup to support more than 2 players. This would mean a tournament owner could never confirm their own game rank without confirming the whole thing.
There was a problem hiding this comment.
Ah was only looking at this from a 2 player game
| def index | ||
| end | ||
|
|
||
| def confirm |
There was a problem hiding this comment.
This code is already in this controller in #update. Is the intention not to send notifications in this case?
There was a problem hiding this comment.
😕 app/controllers/games_controller.rb has an #update action but not the tournament one
No description provided.