本番デプロイ設定: SSL, Kamal, API環境変数化, テスト修正

This commit is contained in:
2026-02-21 23:45:12 +09:00
parent e90ea88758
commit 9626db3dcf
21 changed files with 226 additions and 78 deletions

View File

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