Add default order to dossier.dossier_operation_logs

This commit is contained in:
Paul Chavard 2020-04-02 13:19:56 +02:00
parent d7faa7aeab
commit 413abccd3c

View file

@ -43,7 +43,7 @@ class Dossier < ApplicationRecord
has_many :previous_followers_instructeurs, -> { distinct }, through: :previous_follows, source: :instructeur
has_many :avis, inverse_of: :dossier, dependent: :destroy
has_many :dossier_operation_logs, dependent: :nullify
has_many :dossier_operation_logs, -> { order(:created_at) }, dependent: :nullify, inverse_of: :dossier
belongs_to :groupe_instructeur
has_one :procedure, through: :groupe_instructeur