Fix administration page

This commit is contained in:
Paul Chavard 2019-03-12 15:34:30 +01:00
parent ff079d8c27
commit 4a9ff29391
2 changed files with 2 additions and 1 deletions

View file

@ -15,6 +15,7 @@ class Administrateur < ApplicationRecord
before_validation -> { sanitize_email(:email) }
scope :inactive, -> { where(active: false) }
scope :with_publiees_ou_archivees, -> { joins(:procedures).where(procedures: { aasm_state: [:publiee, :archivee] }) }
validate :password_complexity, if: Proc.new { |a| Devise.password_length.include?(a.password.try(:size)) }

View file

@ -131,7 +131,7 @@
%ul.numbers
%li.number
.number-value
= number_with_delimiter(Procedure.includes(:administrateur).publiees_ou_archivees.map(&:administrateur).uniq.count, :locale => :fr)
= number_with_delimiter(Administrateur.with_publiees_ou_archivees.uniq.count, :locale => :fr)
.number-label<
administrations
%br<>