Merge pull request #4987 from tchak/fix-order-in-test

Les dossier.dossier_operation_logs sont par défaut ordonnés par ordre de création
This commit is contained in:
Pierre de La Morinerie 2020-04-02 14:18:18 +02:00 committed by GitHub
commit c3b6e7e30f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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