FIX: serializer associations
Dieser Commit ist enthalten in:
Ursprung
79dcacf451
Commit
3825d2dba9
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
|
@ -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: '')
|
||||
|
|
|
@ -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
|
||||
|
|
Laden …
In neuem Issue referenzieren