discourse/app/serializers/user_wordpress_serializer.rb
Régis Hanol 189cb3ff12 FEATURE: move migrate_to_new_scheme into a background job
- new hidden site setting 'migrate_to_new_scheme' (defaults to false)
- new rake tasks to toggle migration to new scheme
- FIX: migrate_to_new_scheme also works with CDN
- PERF: improve perf of the DbHelper.remap method
- REFACTOR: UrlHelper is now a class
2015-06-12 12:07:57 +02:00

12 lines
264 B
Ruby

class UserWordpressSerializer < BasicUserSerializer
def avatar_template
if Hash === object
UrlHelper.absolute User.avatar_template(user[:username], user[:uploaded_avatar_id])
else
UrlHelper.absolute object.avatar_template
end
end
end