このコミットが含まれているのは:
2026-06-08 08:45:52 +09:00
コミット fb2b2a632c
4個のファイルの変更33行の追加11行の削除
+2 -3
ファイルの表示
@@ -1,10 +1,9 @@
class GekanatorGame < ApplicationRecord
belongs_to :user, optional: true
belongs_to :user
belongs_to :guessed_post, class_name: 'Post'
belongs_to :correct_post, class_name: 'Post', optional: true
belongs_to :correct_post, class_name: 'Post'
validates :answers, presence: true
validates :correct_post, presence: true
validates :question_count, numericality: { greater_than_or_equal_to: 0 }
validates :won, inclusion: { in: [true, false] }
end