From 8cd389750c4cffd6a2552f6ab28a274410f69c34 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 18 Nov 2023 09:40:05 -0500 Subject: uniqueness on names per puzzle --- app/models/wittle/score.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models') diff --git a/app/models/wittle/score.rb b/app/models/wittle/score.rb index be00fda..54d2b89 100644 --- a/app/models/wittle/score.rb +++ b/app/models/wittle/score.rb @@ -4,5 +4,6 @@ module Wittle validates :name, presence: true validates :ip, presence: true + validates_uniqueness_of :name, scope: :puzzle_id end end -- cgit 1.4.1