mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 06:53:46 +08:00
20 lines
343 B
Ruby
20 lines
343 B
Ruby
class NotificationSerializer < ApplicationSerializer
|
|
|
|
attributes :notification_type,
|
|
:read,
|
|
:created_at,
|
|
:post_number,
|
|
:topic_id,
|
|
:slug,
|
|
:data
|
|
|
|
def slug
|
|
Slug.for(object.topic.title) if object.topic.present?
|
|
end
|
|
|
|
def data
|
|
object.data_hash
|
|
end
|
|
|
|
end
|