Rename ArraySerializer to CollectionSerializer for clarity

This commit is contained in:
Benjamin Fleischer
2015-10-07 05:07:00 -05:00
parent 737784c9b7
commit 2c8b9b796d
19 changed files with 213 additions and 148 deletions

View File

@@ -75,7 +75,7 @@ render json: @posts, serializer: PaginatedSerializer, each_serializer: PostPrevi
And then, you could do something like the following class.
```ruby
class PaginatedSerializer < ActiveModel::Serializer::ArraySerializer
class PaginatedSerializer < ActiveModel::Serializer::CollectionSerializer
def initialize(object, options={})
meta_key = options[:meta_key] || :meta
options[meta_key] ||= {}