This commit is contained in:
groyoh
2015-05-17 22:47:44 +02:00
parent 46ae776175
commit a794a06fa5
4 changed files with 28 additions and 1 deletions

View File

@@ -178,6 +178,13 @@ AlternateBlogSerializer = Class.new(ActiveModel::Serializer) do
attribute :name, key: :title
end
CustomBlogSerializer = Class.new(ActiveModel::Serializer) do
attribute :id
attribute :special_attribute
has_many :articles
end
CommentPreviewSerializer = Class.new(ActiveModel::Serializer) do
attributes :id