2016-12-21 17:26:31 +01:00
|
|
|
class Notification < ActiveRecord::Base
|
|
|
|
belongs_to :dossier
|
|
|
|
|
2016-12-26 11:33:12 +01:00
|
|
|
# after_save :broadcast_notification
|
2016-12-22 22:27:02 +01:00
|
|
|
|
2016-12-22 20:40:23 +01:00
|
|
|
enum type_notif: {
|
2016-12-26 11:33:12 +01:00
|
|
|
commentaire: 'commentaire',
|
|
|
|
cerfa: 'cerfa'
|
2016-12-22 20:40:23 +01:00
|
|
|
}
|
|
|
|
|
2016-12-26 11:33:12 +01:00
|
|
|
# def broadcast_notification
|
|
|
|
# ActionCable.server.broadcast 'notifications',
|
|
|
|
# message: "Nouveau commentaire posté sur le dossier #{self.dossier.id}"
|
|
|
|
# end
|
2016-12-21 17:26:31 +01:00
|
|
|
end
|