mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05: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
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue