Class: Decidim::Core::UserGroupType

Inherits:
Api::Types::BaseObject show all
Defined in:
decidim-core/lib/decidim/api/types/user_group_type.rb

Overview

This type represents a UserGroup

Instance Method Summary collapse

Instance Method Details

#avatar_urlObject


23
24
25
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 23

def avatar_url
  object.presenter.avatar_url
end

#badgeObject


47
48
49
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 47

def badge
  object.presenter.badge
end

#deletedObject


41
42
43
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 41

def deleted
  object.presenter.deleted?
end

#membersObject


53
54
55
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 53

def members
  object.accepted_users
end

#members_countObject


59
60
61
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 59

def members_count
  object.accepted_memberships.count
end

#nicknameObject


17
18
19
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 17

def nickname
  object.presenter.nickname
end

#organization_nameObject


35
36
37
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 35

def organization_name
  object.organization.name
end

#profile_pathObject


29
30
31
# File 'decidim-core/lib/decidim/api/types/user_group_type.rb', line 29

def profile_path
  object.presenter.profile_path
end