2016-08-25 13:14:56 -04:00
|
|
|
class WizardSerializer < ApplicationSerializer
|
2018-11-15 14:44:19 -05:00
|
|
|
attributes :start, :completed
|
2016-08-25 13:14:56 -04:00
|
|
|
|
|
|
|
has_many :steps, serializer: WizardStepSerializer, embed: :objects
|
|
|
|
|
|
|
|
def start
|
|
|
|
object.start.id
|
|
|
|
end
|
2018-11-15 14:44:19 -05:00
|
|
|
|
|
|
|
def completed
|
|
|
|
object.completed?
|
|
|
|
end
|
2016-08-25 13:14:56 -04:00
|
|
|
end
|