13 lines
344 B
Ruby
13 lines
344 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Character < ApplicationRecord
|
|
belongs_to :table, optional: true
|
|
belongs_to :game_system
|
|
belongs_to :user
|
|
has_many :character_sheet_sections, dependent: :destroy
|
|
has_many :stats, through: :character_sheet_sections
|
|
|
|
validates :name, presence: true,
|
|
length: { maximum: 200 }
|
|
end
|