publiee_ou_archivee -> publiees_ou_archivees

This commit is contained in:
gregoirenovel 2017-07-17 15:06:36 +02:00
parent 7b45704137
commit 1c1a47d83a
3 changed files with 7 additions and 7 deletions

View file

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

View file

@ -32,11 +32,11 @@ class Procedure < ActiveRecord::Base
mount_uploader :logo, ProcedureLogoUploader
default_scope { where(hidden_at: nil) }
scope :brouillons, -> { where(published_at: nil).where(archived_at: nil) }
scope :publiees, -> { where.not(published_at: nil).where(archived_at: nil) }
scope :archivees, -> { where.not(archived_at: nil) }
scope :publiee_ou_archivee, -> { where.not(published_at: nil) }
scope :by_libelle, -> { order(libelle: :asc) }
scope :brouillons, -> { where(published_at: nil).where(archived_at: nil) }
scope :publiees, -> { where.not(published_at: nil).where(archived_at: nil) }
scope :archivees, -> { where.not(archived_at: nil) }
scope :publiees_ou_archivees, -> { where.not(published_at: nil) }
scope :by_libelle, -> { order(libelle: :asc) }
validates :libelle, presence: true, allow_blank: false, allow_nil: false
validates :description, presence: true, allow_blank: false, allow_nil: false

View file

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