このコミットが含まれているのは:
2026-06-09 01:29:43 +09:00
コミット a1ea35a7ec
8個のファイルの変更306行の追加90行の削除
+19
ファイルの表示
@@ -0,0 +1,19 @@
class GekanatorQuestionSuggestionsController < ApplicationController
def create
return head :not_found unless current_user&.admin?
game = GekanatorGame.find_by(id: params.require(:gekanator_game_id))
return head :not_found unless game
suggestion = GekanatorQuestionSuggestion.new(
gekanator_game: game,
user: current_user,
question_text: params.require(:question_text))
if suggestion.save
render json: { id: suggestion.id }, status: :created
else
render_validation_error suggestion
end
end
end