本番デプロイ設定: SSL, Kamal, API環境変数化, テスト修正
This commit is contained in:
@@ -17,6 +17,7 @@ class BoardPost < ApplicationRecord
|
||||
post_id: id,
|
||||
participant_id: participant.id,
|
||||
power: participant.power, # 国名
|
||||
display_name: participant.display_name, # 国名 or ユーザー名
|
||||
body: body,
|
||||
phase: phase, # フェーズ情報
|
||||
created_at: created_at.in_time_zone("Asia/Tokyo").strftime("%Y-%m-%d %H:%M")
|
||||
|
||||
@@ -21,4 +21,9 @@ class Participant < ApplicationRecord
|
||||
in: %w[AUSTRIA ENGLAND FRANCE GERMANY ITALY RUSSIA TURKEY],
|
||||
message: "無効な国です"
|
||||
}, allow_nil: true
|
||||
|
||||
# 表示名:国名が設定済みなら国名、未設定ならユーザー名
|
||||
def display_name
|
||||
power.present? ? power : user.username
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user