2014-05-29 17:19:49 -04:00
|
|
|
class UserWordpressSerializer < BasicUserSerializer
|
|
|
|
|
|
|
|
def avatar_template
|
|
|
|
if Hash === object
|
2015-06-12 06:02:36 -04:00
|
|
|
UrlHelper.absolute User.avatar_template(user[:username], user[:uploaded_avatar_id])
|
2014-05-29 17:19:49 -04:00
|
|
|
else
|
2015-06-12 06:02:36 -04:00
|
|
|
UrlHelper.absolute object.avatar_template
|
2014-05-29 17:19:49 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|