2016-03-11 22:48:07 +00:00
|
|
|
class NewTopicSerializer < ActiveModel::Serializer
|
2016-03-11 06:16:04 +00:00
|
|
|
attributes :id,
|
|
|
|
:name,
|
|
|
|
:desc,
|
|
|
|
:link,
|
|
|
|
:permission,
|
|
|
|
:created_at,
|
|
|
|
:updated_at
|
|
|
|
|
2016-03-11 22:48:07 +00:00
|
|
|
has_one :user, serializer: NewUserSerializer
|
|
|
|
has_one :metacode, serializer: NewMetacodeSerializer
|
2016-03-11 06:16:04 +00:00
|
|
|
|
|
|
|
end
|