tabletop-companion/app/models/table.rb

13 lines
329 B
Ruby

# frozen_string_literal: true
class Table < ApplicationRecord
belongs_to :owner, class_name: "User"
belongs_to :game_system
validates :name, presence: true,
length: { maximum: 100 }
validates :slug, presence: true,
length: { maximum: 100 },
uniqueness: true
end