Rename attribute with :key (0.8.x compatibility)

This commit is contained in:
Gary Gordon
2014-11-06 11:10:15 -05:00
parent ac37570bff
commit 08716d20c9
4 changed files with 48 additions and 1 deletions

View File

@@ -95,3 +95,8 @@ PaginatedSerializer = Class.new(ActiveModel::Serializer::ArraySerializer) do
'paginated'
end
end
AlternateBlogSerializer = Class.new(ActiveModel::Serializer) do
attribute :id
attribute :name, key: :title
end