Class: Pageflow::Admin::UserAccountBadgeList Private

Inherits:
ViewComponent
  • Object
show all
Defined in:
app/views/components/pageflow/admin/user_account_badge_list.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 12.2

Instance Method Summary collapse

Instance Method Details

#build(user) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 12.2



7
8
9
10
11
12
13
14
15
# File 'app/views/components/pageflow/admin/user_account_badge_list.rb', line 7

def build(user)
  ul class: 'badge_list' do
    user..each do |membership|
      build_badge(membership) if authorized?(:see_badge_belonging_to, membership.entity)
    end

    build_admin_badge if user.admin?
  end
end