2013-02-05 14:16:51 -05:00
|
|
|
class TopicPostCountSerializer < BasicUserSerializer
|
|
|
|
|
|
|
|
attributes :post_count
|
|
|
|
|
|
|
|
def id
|
|
|
|
object[:user].id
|
|
|
|
end
|
|
|
|
|
|
|
|
def username
|
|
|
|
object[:user].username
|
|
|
|
end
|
|
|
|
|
|
|
|
def post_count
|
|
|
|
object[:post_count]
|
|
|
|
end
|
|
|
|
|
2014-05-22 03:37:02 -04:00
|
|
|
def uploaded_avatar_id
|
|
|
|
object[:user].uploaded_avatar_id
|
|
|
|
end
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2014-05-22 03:37:02 -04:00
|
|
|
def include_uploaded_avatar_id?
|
|
|
|
SiteSetting.allow_uploaded_avatars? && object[:user].use_uploaded_avatar
|
|
|
|
end
|
2013-02-07 10:45:24 -05:00
|
|
|
end
|