このコミットが含まれているのは:
2026-06-08 12:44:45 +09:00
コミット 543f051f8f
12個のファイルの変更70行の追加64行の削除
+2 -2
ファイルの表示
@@ -1,6 +1,6 @@
class GekanatorGamesController < ApplicationController
def create
return head :unauthorized unless current_user
return head :not_found unless current_user&.admin?
guessed_post_id = params.require(:guessed_post_id)
correct_post_id = params[:correct_post_id].presence
@@ -11,7 +11,7 @@ class GekanatorGamesController < ApplicationController
guessed_post_id:,
correct_post_id:,
won: correct_post_id.present? && guessed_post_id.to_i == correct_post_id.to_i,
question_count: params.require(:question_count),
question_count: answers.length,
answers:)
if game.save