Skip to content

Commit

Permalink
small refacto to simplify scope
Browse files Browse the repository at this point in the history
  • Loading branch information
lisa-durand committed Jul 24, 2024
1 parent b820577 commit 7da3e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/dossier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def classer_sans_suite(motivation: nil, instructeur: nil, processed_at: Time.zon
scope :hidden_by_user, -> { where.not(hidden_by_user_at: nil) }
scope :hidden_by_administration, -> { where.not(hidden_by_administration_at: nil) }
scope :hidden_by_expired, -> { where.not(hidden_by_expired_at: nil) }
scope :visible_by_user, -> { where(for_procedure_preview: false).where(hidden_by_user_at: nil, editing_fork_origin_id: nil).where(hidden_by_expired_at: nil) }
scope :visible_by_user, -> { where(for_procedure_preview: false, hidden_by_user_at: nil, editing_fork_origin_id: nil, hidden_by_expired_at: nil) }
scope :visible_by_administration, -> {
state_not_brouillon
.where(hidden_by_administration_at: nil)
Expand Down

0 comments on commit 7da3e05

Please sign in to comment.