demarches-normaliennes/app/models/dossier_correction.rb
2023-08-02 11:43:23 +02:00

14 lines
319 B
Ruby

class DossierCorrection < ApplicationRecord
belongs_to :dossier
belongs_to :commentaire
validates_associated :commentaire
scope :pending, -> { where(resolved_at: nil) }
enum reason: { incorrect: 'incorrect', incomplete: 'incomplete' }, _prefix: :dossier
def resolved?
resolved_at.present?
end
end