diff --git a/serializers/custom_wizard/wizard_field_serializer.rb b/serializers/custom_wizard/wizard_field_serializer.rb index b1a7afad..dbaa2054 100644 --- a/serializers/custom_wizard/wizard_field_serializer.rb +++ b/serializers/custom_wizard/wizard_field_serializer.rb @@ -7,9 +7,9 @@ class CustomWizardFieldSerializer < ::WizardFieldSerializer :file_types, :limit, :property + + has_many :choices, serializer: WizardFieldChoiceSerializer, embed: :objects - has_many :fields, serializer: CustomWizardFieldSerializer, embed: :objects - def label return object.label if object.label.present? I18n.t("#{object.key || i18n_key}.label", default: '') diff --git a/serializers/custom_wizard/wizard_step_serializer.rb b/serializers/custom_wizard/wizard_step_serializer.rb index 6c750270..05f48efe 100644 --- a/serializers/custom_wizard/wizard_step_serializer.rb +++ b/serializers/custom_wizard/wizard_step_serializer.rb @@ -3,6 +3,7 @@ class ::CustomWizardStepSerializer < ::WizardStepSerializer attributes :permitted, :permitted_message + has_many :fields, serializer: ::CustomWizardFieldSerializer, embed: :objects def title return PrettyText.cook(object.title) if object.title