1 2 3 4 5 6 7
class Score < ApplicationRecord belongs_to :puzzle validates :name, presence: true validates :ip, presence: true validates_uniqueness_of :name, scope: :puzzle_id end