Notification: add methods to retrieve notifications

This commit is contained in:
Simon Lehericey 2017-10-05 16:10:00 +02:00 committed by Mathieu Magnin
parent bb147bcb1f
commit 155a5f7826
7 changed files with 235 additions and 0 deletions

View file

@ -5,6 +5,7 @@ class Commentaire < ActiveRecord::Base
belongs_to :piece_justificative
default_scope { order(created_at: :asc) }
scope :updated_since?, -> (date) { where('commentaires.updated_at > ?', date) }
after_create :notify