本番デプロイ設定: SSL, Kamal, API環境変数化, テスト修正
This commit is contained in:
@@ -75,8 +75,11 @@ class GamesController < ApplicationController
|
||||
# 全7カ国(固定)
|
||||
powers = %w[AUSTRIA ENGLAND FRANCE GERMANY ITALY RUSSIA TURKEY]
|
||||
|
||||
# N+1 防止のためparticipantsをキャッシュ
|
||||
participants_cache = @game.participants.includes(:user).index_by(&:power)
|
||||
|
||||
@country_statuses = powers.map do |power|
|
||||
participant = @game.participants.find_by(power: power)
|
||||
participant = participants_cache[power]
|
||||
# 終了済みなら全員完了扱い、そうでなければターンごとの提出状況
|
||||
submitted = @game_finished ? true : @display_turn.orders_submitted_for?(power)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user