Sha256: 0772835569e2bbe6e8a5211704975da1a0f33229f651750206160f72db8e1238

Contents?: true

Size: 508 Bytes

Versions: 8

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module System
    class UsersAwaitingApprovalComponent < ApplicationComponent
      rattr_initialize [:current_user!]

      def users_needing_approval_count
        @users_needing_approval_count ||= User.unapproved.count
      end

      def users_needing_approval_title
        [
          users_needing_approval_count,
          "user".pluralize(users_needing_approval_count),
          "awaiting approval"
        ].join(" ")
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
renalware-core-2.0.167 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.166 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.165 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.164 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.163 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.162 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.161 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.160 app/components/renalware/system/users_awaiting_approval_component.rb