discourse/app/serializers/post_wordpress_serializer.rb

14 lines
288 B
Ruby

# The most basic attributes of a topic that we need to create a link for it.
class PostWordpressSerializer < BasicPostSerializer
attributes :post_number
def avatar_template
if object.user
UrlHelper.absolute object.user.avatar_template
else
nil
end
end
end