metamaps--metamaps/app/serializers/new_topic_serializer.rb

19 lines
451 B
Ruby
Raw Normal View History

2016-03-11 22:48:07 +00:00
class NewTopicSerializer < ActiveModel::Serializer
embed :ids, include: true
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
#def filter(keys)
# keys.delete(:outcome_author) unless object.outcome_author.present?
# keys
#end
end