demarches-normaliennes/app/models/release_note.rb

15 lines
271 B
Ruby
Raw Normal View History

2023-10-03 16:14:09 +02:00
class ReleaseNote < ApplicationRecord
has_rich_text :body
CATEGORIES = [
'administrateur',
'instructeur',
'expert',
'usager',
'api'
]
validates :categories, presence: true, inclusion: { in: CATEGORIES }
validates :body, presence: true
2023-10-03 16:14:09 +02:00
end