2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-03 23:54:20 +08:00
discourse/app/serializers/group_post_user_serializer.rb
Jeff Wong e01d5f80b4
Add primary group classes (#12807)
* DEV: expose primary group as classes in more areas.

Add group classes in the group posts pages

Add primary group name as a class on the user card
2021-04-22 15:00:23 -07:00

9 lines
221 B
Ruby

# frozen_string_literal: true
class GroupPostUserSerializer < BasicUserSerializer
attributes :title, :name, :primary_group_name
def primary_group_name
object.primary_group.name if object.primary_group
end
end