Module: LoadedInGroupList

Extended by:
ActiveSupport::Concern
Included in:
Group
Defined in:
app/models/concerns/loaded_in_group_list.rb

Instance Method Summary collapse

Instance Method Details

#children_countObject


63
64
65
# File 'app/models/concerns/loaded_in_group_list.rb', line 63

def children_count
  @children_count ||= project_count + subgroup_count
end

#guest_countObject


79
80
81
# File 'app/models/concerns/loaded_in_group_list.rb', line 79

def guest_count
  @guest_count ||= members.guests.count
end

#member_countObject


75
76
77
# File 'app/models/concerns/loaded_in_group_list.rb', line 75

def member_count
  @member_count ||= try(:preloaded_member_count) || members.count
end

#project_countObject


67
68
69
# File 'app/models/concerns/loaded_in_group_list.rb', line 67

def project_count
  @project_count ||= try(:preloaded_project_count) || projects.non_archived.count
end

#subgroup_countObject


71
72
73
# File 'app/models/concerns/loaded_in_group_list.rb', line 71

def subgroup_count
  @subgroup_count ||= try(:preloaded_subgroup_count) || children.count
end