Sha256: 6886fe6017415b7224111b998d25af51f0e4bd9ab549ec1906ea895b18037026

Contents?: true

Size: 240 Bytes

Versions: 2

Compression:

Stored size: 240 Bytes

Contents

class Wizard < ApplicationRecord

  validates :name, length: { minimum: 5 }, presence: true

  enum house: {
    'Gryffindor': 0,
    'Hufflepuff': 1,
    'Ravenclaw': 2,
    'Slytherin': 3,
  }

  has_one :wand
  has_many :spell_books
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sorbet-rails-0.2.0 spec/support/rails_shared/app/models/wizard.rb
sorbet-rails-0.1.3 spec/support/rails_app/app/models/wizard.rb