mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
19 lines
343 B
Ruby
19 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
|