Use the same order for constants and scopes in Dossier

This commit is contained in:
gregoirenovel 2017-05-26 19:24:28 +02:00
parent 0971ede57e
commit d5023a3d38

View file

@ -59,9 +59,9 @@ class Dossier < ActiveRecord::Base
scope :all_state, -> { not_archived.state_not_brouillon.order_by_updated_at(:asc) } scope :all_state, -> { not_archived.state_not_brouillon.order_by_updated_at(:asc) }
scope :nouveaux, -> { not_archived.state_nouveaux.order_by_updated_at(:asc) } scope :nouveaux, -> { not_archived.state_nouveaux.order_by_updated_at(:asc) }
scope :ouvert, -> { not_archived.state_ouvert.order_by_updated_at(:asc) }
scope :waiting_for_gestionnaire, -> { not_archived.state_waiting_for_gestionnaire.order_by_updated_at(:asc) } scope :waiting_for_gestionnaire, -> { not_archived.state_waiting_for_gestionnaire.order_by_updated_at(:asc) }
scope :waiting_for_user, -> { not_archived.state_waiting_for_user.order_by_updated_at(:asc) } scope :waiting_for_user, -> { not_archived.state_waiting_for_user.order_by_updated_at(:asc) }
scope :ouvert, -> { not_archived.state_ouvert.order_by_updated_at(:asc) }
scope :a_instruire, -> { not_archived.state_a_instruire.order_by_updated_at(:asc) } scope :a_instruire, -> { not_archived.state_a_instruire.order_by_updated_at(:asc) }
scope :termine, -> { not_archived.state_termine.order_by_updated_at(:asc) } scope :termine, -> { not_archived.state_termine.order_by_updated_at(:asc) }
scope :downloadable, -> { state_not_brouillon.order_by_updated_at(:asc) } scope :downloadable, -> { state_not_brouillon.order_by_updated_at(:asc) }