0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-15 06:12:54 +01:00
discourse-custom-wizard/app/serializers/custom_wizard/submission_serializer.rb

17 Zeilen
424 B
Ruby

# frozen_string_literal: true
class CustomWizard::SubmissionSerializer < ApplicationSerializer
attributes :id,
:username,
:fields,
:submitted_at,
:route_to,
:redirect_on_complete,
:redirect_to
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