Delete now unused scopes on Procedure
This commit is contained in:
parent
75aebe4f07
commit
2f4f10683f
1 changed files with 2 additions and 5 deletions
|
@ -32,13 +32,10 @@ class Procedure < ActiveRecord::Base
|
|||
mount_uploader :logo, ProcedureLogoUploader
|
||||
|
||||
default_scope { where(hidden_at: nil) }
|
||||
scope :brouillons, -> { not_published.not_archived }
|
||||
scope :brouillons, -> { where(published_at: nil).where(archived_at: nil) }
|
||||
scope :publiees, -> { where.not(published_at: nil).where(archived_at: nil) }
|
||||
scope :archivees, -> { archived }
|
||||
scope :archivees, -> { where.not(archived_at: nil) }
|
||||
scope :publiee_ou_archivee, -> { where.not(published_at: nil) }
|
||||
scope :not_published, -> { where(published_at: nil) }
|
||||
scope :archived, -> { where.not(archived_at: nil) }
|
||||
scope :not_archived, -> { where(archived_at: nil) }
|
||||
scope :by_libelle, -> { order(libelle: :asc) }
|
||||
|
||||
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
||||
|
|
Loading…
Reference in a new issue