From 030a11d98c41ff02be8e32391e776106fad4fc5e Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Thu, 21 Sep 2017 16:19:52 +0200 Subject: [PATCH] [Fix #503] Dossier: remove unused ouvert state --- app/models/dossier.rb | 3 --- app/services/dossiers_list_gestionnaire_service.rb | 4 ---- 2 files changed, 7 deletions(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 6da2b984e..1f59bd56f 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -12,7 +12,6 @@ class Dossier < ActiveRecord::Base BROUILLON = %w(draft) NOUVEAUX = %w(initiated) - OUVERT = %w(updated replied) EN_CONSTRUCTION = %w(initiated updated replied) EN_INSTRUCTION = %w(received) EN_CONSTRUCTION_OU_INSTRUCTION = EN_CONSTRUCTION + EN_INSTRUCTION @@ -48,7 +47,6 @@ class Dossier < ActiveRecord::Base scope :state_brouillon, -> { where(state: BROUILLON) } scope :state_not_brouillon, -> { where.not(state: BROUILLON) } scope :state_nouveaux, -> { where(state: NOUVEAUX) } - scope :state_ouvert, -> { where(state: OUVERT) } scope :state_en_construction, -> { where(state: EN_CONSTRUCTION) } scope :state_en_instruction, -> { where(state: EN_INSTRUCTION) } scope :state_en_construction_ou_instruction, -> { where(state: EN_CONSTRUCTION_OU_INSTRUCTION) } @@ -62,7 +60,6 @@ class Dossier < ActiveRecord::Base 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 :ouvert, -> { not_archived.state_ouvert.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 :downloadable, -> { state_not_brouillon.order_by_updated_at(:asc) } diff --git a/app/services/dossiers_list_gestionnaire_service.rb b/app/services/dossiers_list_gestionnaire_service.rb index e7b49c286..843185fee 100644 --- a/app/services/dossiers_list_gestionnaire_service.rb +++ b/app/services/dossiers_list_gestionnaire_service.rb @@ -31,10 +31,6 @@ class DossiersListGestionnaireService @nouveaux ||= filter_dossiers.nouveaux end - def ouvert - @ouvert ||= filter_dossiers.ouvert - end - def a_instruire @a_instruire ||= filter_dossiers.a_instruire end