mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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
This commit is contained in:
@@ -2,11 +2,9 @@
|
||||
class PostWordpressSerializer < BasicPostSerializer
|
||||
attributes :post_number
|
||||
|
||||
include UrlHelper
|
||||
|
||||
def avatar_template
|
||||
if object.user
|
||||
absolute object.user.avatar_template
|
||||
UrlHelper.absolute object.user.avatar_template
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
class UserWordpressSerializer < BasicUserSerializer
|
||||
|
||||
include UrlHelper
|
||||
|
||||
def avatar_template
|
||||
if Hash === object
|
||||
absolute User.avatar_template(user[:username], user[:uploaded_avatar_id])
|
||||
UrlHelper.absolute User.avatar_template(user[:username], user[:uploaded_avatar_id])
|
||||
else
|
||||
absolute object.avatar_template
|
||||
UrlHelper.absolute object.avatar_template
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user