discourse/app/serializers/wizard_serializer.rb

14 lines
237 B
Ruby
Raw Normal View History

2016-08-26 01:14:56 +08:00
class WizardSerializer < ApplicationSerializer
attributes :start, :completed
2016-08-26 01:14:56 +08:00
has_many :steps, serializer: WizardStepSerializer, embed: :objects
def start
object.start.id
end
def completed
object.completed?
end
2016-08-26 01:14:56 +08:00
end