BUGFIX: broken like expansion

This commit is contained in:
Sam
2014-05-27 19:43:19 +10:00
parent 4b611f87e9
commit f733d5532f
2 changed files with 5 additions and 7 deletions

View File

@ -5,12 +5,6 @@ class BasicUserSerializer < ApplicationSerializer
SiteSetting.enable_names?
end
# so weird we send a hash in here sometimes and an object others
def include_uploaded_avatar_id?
SiteSetting.allow_uploaded_avatars? &&
(Hash === object ? user[:uploaded_avatar_id] : object.uploaded_avatar_id)
end
def avatar_template
if Hash === object
User.avatar_template(user[:username], user[:uploaded_avatar_id])