2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

Wizard - Color Scheme Step

This commit is contained in:
Robin Ward 2016-09-02 11:42:14 -04:00
parent 9f12b571ef
commit 3f6e3b9aff
21 changed files with 343 additions and 23 deletions

View file

@ -52,7 +52,17 @@ class WizardFieldSerializer < ApplicationSerializer
def options
object.options.map do |o|
{id: o, label: I18n.t("#{i18n_key}.options.#{o}")}
result = {id: o, label: I18n.t("#{i18n_key}.options.#{o}")}
data = object.option_data[o]
if data.present?
as_json = data.dup
as_json.delete(:id)
result[:data] = as_json
end
result
end
end