# frozen_string_literal: true class Counter < ApplicationRecord include Sluggable belongs_to :character_sheet_section validates :name, presence: true, length: { maximum: 100 }, uniqueness: { scope: :character_sheet_section_id } validates :value, presence: true, numericality: true before_validation :set_slug end