Merge pull request #10493 from mfo/US/ensure-order-on-avis-list
Amélioration, ETQ instructeur, je souhaite que les avis soient ordonnancés dans plus recent au plus ancien
This commit is contained in:
commit
7e7b17e875
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ class Dossier < ApplicationRecord
|
||||||
has_many :previous_follows, -> { inactive }, class_name: 'Follow', inverse_of: :dossier
|
has_many :previous_follows, -> { inactive }, class_name: 'Follow', inverse_of: :dossier
|
||||||
has_many :followers_instructeurs, through: :follows, source: :instructeur
|
has_many :followers_instructeurs, through: :follows, source: :instructeur
|
||||||
has_many :previous_followers_instructeurs, -> { distinct }, through: :previous_follows, source: :instructeur
|
has_many :previous_followers_instructeurs, -> { distinct }, through: :previous_follows, source: :instructeur
|
||||||
has_many :avis, inverse_of: :dossier, dependent: :destroy
|
has_many :avis, -> { order(:created_at) }, inverse_of: :dossier, dependent: :destroy
|
||||||
has_many :experts, through: :avis
|
has_many :experts, through: :avis
|
||||||
has_many :traitements, -> { order(:processed_at) }, inverse_of: :dossier, dependent: :destroy do
|
has_many :traitements, -> { order(:processed_at) }, inverse_of: :dossier, dependent: :destroy do
|
||||||
def passer_en_construction(instructeur: nil, processed_at: Time.zone.now)
|
def passer_en_construction(instructeur: nil, processed_at: Time.zone.now)
|
||||||
|
|
Loading…
Reference in a new issue