discourse/app/serializers/invited_list_serializer.rb

11 lines
279 B
Ruby
Raw Normal View History

2013-02-05 13:16:51 -06:00
class InvitedListSerializer < ApplicationSerializer
has_many :pending, serializer: InviteSerializer, embed: :objects
has_many :redeemed, serializer: InviteSerializer, embed: :objects
def include_pending?
scope.can_see_pending_invites_from?(object.by_user)
end
end