demarches-normaliennes/app/models/notification.rb

19 lines
579 B
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class Notification < ActiveRecord::Base
belongs_to :dossier
# after_save :broadcast_notification
enum type_notif: {
commentaire: 'commentaire',
cerfa: 'cerfa',
piece_justificative: 'piece_justificative',
champs: 'champs',
submitted: 'submitted'
}
# def broadcast_notification
# ActionCable.server.broadcast 'notifications',
# message: "Dossier nº #{self.dossier.id} : #{self.liste.last}",
# dossier: {id: self.dossier.id}
# end
end