2021-06-23 08:13:58 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
class CustomWizard::SubmissionSerializer < ApplicationSerializer
|
|
|
|
attributes :id,
|
|
|
|
:username,
|
|
|
|
:fields,
|
2021-07-14 08:04:19 +02:00
|
|
|
:submitted_at
|
2021-06-23 08:13:58 +02:00
|
|
|
|
|
|
|
def username
|
|
|
|
object.user.present? ?
|
|
|
|
object.user.username :
|
|
|
|
I18n.t('admin.wizard.submission.no_user', user_id: object.user_id)
|
|
|
|
end
|
2021-06-23 08:15:17 +02:00
|
|
|
end
|