Add the not_published Procedure scope

This commit is contained in:
gregoirenovel 2017-07-10 16:46:37 +02:00
parent 811723e5fb
commit 31b23ac74e
3 changed files with 3 additions and 2 deletions

View file

@ -33,6 +33,7 @@ class Procedure < ActiveRecord::Base
default_scope { where(hidden_at: nil) }
scope :published, -> { where(published: true) }
scope :not_published, -> { where(published: false) }
scope :not_archived, -> { where(archived: false) }
scope :by_libelle, -> { order(libelle: :asc) }