discourse/app/serializers/post_action_user_serializer.rb
Régis Hanol 93f9dcfcec FIX: don't overwrite custom uploaded avatar when selecting gravatar
FIX: remove unecessary serialized fields
2015-09-11 15:10:56 +02:00

20 lines
323 B
Ruby

class PostActionUserSerializer < BasicUserSerializer
attributes :post_url
def id
object.user.id
end
def username
object.user.username
end
def avatar_template
object.user.avatar_template
end
def post_url
object.related_post.url if object.related_post_id && object.related_post
end
end