mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 16:46:12 +08:00
Use userfield serializer in json dump
Use userfield serializer for json dump to make sure that also the options are serialized correctly.
This commit is contained in:
parent
7eb32be4de
commit
fc2fe5f02d
|
@ -80,7 +80,9 @@ class Site
|
|||
return {
|
||||
periods: TopTopic.periods.map(&:to_s),
|
||||
filters: Discourse.filters.map(&:to_s),
|
||||
user_fields: UserField.all
|
||||
user_fields: UserField.all.map do |userfield|
|
||||
UserFieldSerializer.new(userfield, root: false, scope: guardian)
|
||||
end
|
||||
}.to_json
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user