FIX: user avatar urls need to be absolute in wordpress api

This commit is contained in:
Neil Lalonde
2014-05-29 17:19:49 -04:00
parent d69472c9fb
commit e6841d0849
4 changed files with 31 additions and 4 deletions

View File

@ -0,0 +1,13 @@
class UserWordpressSerializer < BasicUserSerializer
include UrlHelper
def avatar_template
if Hash === object
absolute User.avatar_template(user[:username], user[:uploaded_avatar_id])
else
absolute object.avatar_template
end
end
end