models: return procedure revisions in deterministic order
Fixes a randomly-failing spec in spec/models/procedure_revision_spec.rb.
This commit is contained in:
parent
378fd508b4
commit
c01d640997
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Procedure < ApplicationRecord
|
|||
|
||||
has_many :types_de_champ, -> { root.public_only.ordered }, inverse_of: :procedure, dependent: :destroy
|
||||
has_many :types_de_champ_private, -> { root.private_only.ordered }, class_name: 'TypeDeChamp', inverse_of: :procedure, dependent: :destroy
|
||||
has_many :revisions, class_name: 'ProcedureRevision', inverse_of: :procedure, dependent: :destroy
|
||||
has_many :revisions, -> { order(:id) }, class_name: 'ProcedureRevision', inverse_of: :procedure, dependent: :destroy
|
||||
belongs_to :draft_revision, class_name: 'ProcedureRevision', optional: true
|
||||
belongs_to :published_revision, class_name: 'ProcedureRevision', optional: true
|
||||
has_many :deleted_dossiers, dependent: :destroy
|
||||
|
|
Loading…
Reference in a new issue