2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-05-29 17:19:49 -04:00
|
|
|
# The most basic attributes of a topic that we need to create a link for it.
|
|
|
|
class PostWordpressSerializer < BasicPostSerializer
|
2014-10-22 23:02:06 -04:00
|
|
|
attributes :post_number
|
2014-05-29 17:19:49 -04:00
|
|
|
|
|
|
|
def avatar_template
|
|
|
|
if object.user
|
2015-06-12 06:02:36 -04:00
|
|
|
UrlHelper.absolute object.user.avatar_template
|
2014-05-29 17:19:49 -04:00
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|