Merge pull request #3601 from betagouv/dev

2019-03-12-01
This commit is contained in:
Mathieu Magnin 2019-03-12 16:03:36 +01:00 committed by GitHub
commit c6c7982a22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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<>