Sha256: 26083a52ebe75d03d226fd83beae3c3b1e3eceea31427dc914793dfb2246d184
Contents?: true
Size: 391 Bytes
Versions: 4
Compression:
Stored size: 391 Bytes
Contents
# typed: strict class SpellBook < ApplicationRecord validates :name, length: { minimum: 5 }, presence: true # simulate when belongs_to is optional by default, but it is enforced at the DB level belongs_to :wizard, optional: true # habtm enforced at the DB level has_and_belongs_to_many :spells enum book_type: { unclassified: 0, biology: 1, dark_art: 999, } end
Version data entries
4 entries across 1 versions & 1 rubygems