Class: Decidim::UserGroupPresenter

Inherits:
UserPresenter
  • Object
show all
Defined in:
app/presenters/decidim/user_group_presenter.rb

Overview

Decorator for user groups

Instance Method Summary collapse

Methods inherited from UserPresenter

#avatar, #avatar_url, #default_avatar_url, #direct_messages_enabled?, #display_mention, #has_tooltip?, #nickname, #profile_path, #profile_url

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#badgeObject



12
13
14
15
16
# File 'app/presenters/decidim/user_group_presenter.rb', line 12

def badge
  return "" unless verified?

  "verified-badge"
end

#can_be_contacted?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/presenters/decidim/user_group_presenter.rb', line 18

def can_be_contacted?
  true
end

#can_follow?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/presenters/decidim/user_group_presenter.rb', line 26

def can_follow?
  false
end

#deleted?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/presenters/decidim/user_group_presenter.rb', line 8

def deleted?
  false
end

#members_countObject



30
31
32
# File 'app/presenters/decidim/user_group_presenter.rb', line 30

def members_count
  Decidim::UserGroups::AcceptedUsers.for(__getobj__).count
end

#officialization_textObject



22
23
24
# File 'app/presenters/decidim/user_group_presenter.rb', line 22

def officialization_text
  I18n.t("decidim.profiles.default_officialization_text_for_user_groups")
end