Notification: new acknowledgment system

This commit is contained in:
Simon Lehericey 2017-10-24 11:41:22 +02:00 committed by Mathieu Magnin
parent f7d7cec5ae
commit ed4e885e6f
3 changed files with 29 additions and 0 deletions

View file

@ -175,6 +175,12 @@ class Gestionnaire < ActiveRecord::Base
Dossier.where(id: dossiers_id_with_notifications(dossiers)).group(:procedure_id).count
end
def mark_tab_as_seen(dossier, tab)
attributes = {}
attributes["#{tab}_seen_at"] = DateTime.now
Follow.where(gestionnaire: self, dossier: dossier).update_all(attributes)
end
private
def valid_couple_table_attr? table, column