Rename the published scope on Procedure

This commit is contained in:
gregoirenovel 2017-07-13 14:32:12 +02:00
parent 9305cc6c45
commit ab9cf1c351
3 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ class StatsController < ApplicationController
MEAN_NUMBER_OF_CHAMPS_IN_A_FORM = 24.0
def index
procedures = Procedure.published
procedures = Procedure.publiee_ou_archivee
dossiers = Dossier.where.not(:state => :draft)
@procedures_count = procedures.count

View file

@ -32,7 +32,7 @@ class Procedure < ActiveRecord::Base
mount_uploader :logo, ProcedureLogoUploader
default_scope { where(hidden_at: nil) }
scope :published, -> { where.not(published_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) }

View file

@ -80,7 +80,7 @@
%ul.numbers
%li.number
.number-value
= number_with_delimiter(Procedure.published.count, :locale => :fr)
= number_with_delimiter(Procedure.publiee_ou_archivee.count, :locale => :fr)
.number-label<
procédures
%br<>