commit
c6c7982a22
2 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ class Administrateur < ApplicationRecord
|
||||||
before_validation -> { sanitize_email(:email) }
|
before_validation -> { sanitize_email(:email) }
|
||||||
|
|
||||||
scope :inactive, -> { where(active: false) }
|
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)) }
|
validate :password_complexity, if: Proc.new { |a| Devise.password_length.include?(a.password.try(:size)) }
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
%ul.numbers
|
%ul.numbers
|
||||||
%li.number
|
%li.number
|
||||||
.number-value
|
.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<
|
.number-label<
|
||||||
administrations
|
administrations
|
||||||
%br<>
|
%br<>
|
||||||
|
|
Loading…
Reference in a new issue