Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 11:00:28 +01:00
FIX: serializer associations
Dieser Commit ist enthalten in:
Ursprung
79dcacf451
Commit
3825d2dba9
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
|
@ -8,7 +8,7 @@ class CustomWizardFieldSerializer < ::WizardFieldSerializer
|
|||
:limit,
|
||||
:property
|
||||
|
||||
has_many :fields, serializer: CustomWizardFieldSerializer, embed: :objects
|
||||
has_many :choices, serializer: WizardFieldChoiceSerializer, embed: :objects
|
||||
|
||||
def label
|
||||
return object.label if object.label.present?
|
||||
|
|
|
@ -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