Merge pull request #3662 from b-studios/include-options-in-serialization

Use userfield serializer in json dump
This commit is contained in:
Robin Ward 2015-08-19 12:16:25 -04:00
commit e2c9e11dd9
1 changed files with 3 additions and 1 deletions

View File

@ -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