mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 21:33:38 +08:00
21 lines
307 B
Ruby
21 lines
307 B
Ruby
class PostActionUserSerializer < BasicUserSerializer
|
|
attributes :id, :username, :avatar_template, :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_id
|
|
end
|
|
|
|
end
|