discourse/app/serializers/search_post_serializer.rb

10 lines
209 B
Ruby

class SearchPostSerializer < BasicPostSerializer
has_one :topic, serializer: TopicListItemSerializer
attributes :like_count, :blurb, :post_number
def blurb
options[:result].blurb(object)
end
end