Commentaire: use scope to order commentaires association

This commit is contained in:
Simon Lehericey 2017-07-20 14:17:12 +02:00 committed by Mathieu Magnin
parent 714b2a5f08
commit 0d27ca3bca
2 changed files with 3 additions and 1 deletions

View file

@ -4,6 +4,8 @@ class Commentaire < ActiveRecord::Base
belongs_to :piece_justificative
scope :ordered, -> { order(created_at: :asc) }
after_create :notify
def header