From 1c1a47d83a636159c14c1a52d103245ea5f0bd16 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 17 Jul 2017 15:06:36 +0200 Subject: [PATCH] publiee_ou_archivee -> publiees_ou_archivees --- app/controllers/stats_controller.rb | 2 +- app/models/procedure.rb | 10 +++++----- app/views/root/landing.html.haml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index 619e43121..ec79e78f5 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -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 diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 665eddb24..1f0508c22 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -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 diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index 1d9d97d73..2801ddbdb 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -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<>