2013-04-22 03:45:03 -04:00
|
|
|
class PostActionUserSerializer < BasicUserSerializer
|
2014-05-27 05:43:19 -04:00
|
|
|
attributes :post_url
|
2013-08-14 12:18:54 -04:00
|
|
|
|
|
|
|
def id
|
|
|
|
object.user.id
|
|
|
|
end
|
|
|
|
|
|
|
|
def username
|
|
|
|
object.user.username
|
|
|
|
end
|
|
|
|
|
|
|
|
def avatar_template
|
|
|
|
object.user.avatar_template
|
|
|
|
end
|
2013-04-22 03:45:03 -04:00
|
|
|
|
|
|
|
def post_url
|
2013-09-10 21:24:42 -04:00
|
|
|
object.related_post.url if object.related_post_id && object.related_post
|
2013-04-22 03:45:03 -04:00
|
|
|
end
|
2013-08-14 12:18:54 -04:00
|
|
|
|
2013-04-22 03:45:03 -04:00
|
|
|
end
|