discourse/app/serializers/post_action_user_serializer.rb

25 lines
390 B
Ruby
Raw Normal View History

class PostActionUserSerializer < BasicUserSerializer
2014-05-27 04:43:19 -05:00
attributes :post_url
def id
object.user.id
end
def username
object.user.username
end
2014-05-27 04:43:19 -05:00
def uploaded_avatar_id
object.user.uploaded_avatar_id
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