0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00
discourse-custom-wizard/serializers/custom_wizard/notice_serializer.rb
2021-10-05 20:54:06 +08:00

21 Zeilen
432 B
Ruby

# frozen_string_literal: true
class CustomWizard::NoticeSerializer < ApplicationSerializer
attributes :id,
:message,
:type,
:created_at,
:expired_at,
:updated_at,
:dismissed_at,
:retrieved_at,
:dismissable
def dismissable
object.dismissable?
end
def type
CustomWizard::Notice.types.key(object.type)
end
end