Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
COMPATIBILITY: categories are being loaded differently on Site model
See 0e4b8c5318
Dieser Commit ist enthalten in:
Ursprung
582b9d82aa
Commit
5a6856fcff
1 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
|
@ -8,11 +8,11 @@ class CustomWizard::WizardSerializer < CustomWizard::BasicWizardSerializer
|
|||
:completed,
|
||||
:required,
|
||||
:permitted,
|
||||
:uncategorized_category_id
|
||||
:uncategorized_category_id,
|
||||
:categories
|
||||
|
||||
has_many :steps, serializer: ::CustomWizard::StepSerializer, embed: :objects
|
||||
has_one :user, serializer: ::BasicUserSerializer, embed: :objects
|
||||
has_many :categories, serializer: ::BasicCategorySerializer, embed: :objects
|
||||
has_many :groups, serializer: ::BasicGroupSerializer, embed: :objects
|
||||
|
||||
def completed
|
||||
|
@ -56,4 +56,8 @@ class CustomWizard::WizardSerializer < CustomWizard::BasicWizardSerializer
|
|||
def include_uncategorized_category_id?
|
||||
object.needs_categories
|
||||
end
|
||||
|
||||
def categories
|
||||
object.categories.map { |c| c.to_h }
|
||||
end
|
||||
end
|
||||
|
|
Laden …
In neuem Issue referenzieren