demarches-normaliennes/app/models/label.rb
2024-11-04 16:48:44 +01:00

14 lines
374 B
Ruby

# frozen_string_literal: true
class Label < ApplicationRecord
belongs_to :procedure
has_many :dossier_labels, dependent: :destroy
GENERIC_LABELS = [
{ name: 'à relancer', color: 'brown-caramel' },
{ name: 'complet', color: 'green-bourgeon' },
{ name: 'prêt pour validation', color: 'green-archipel' }
]
validates :name, :color, presence: true
end