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

@@ -7,9 +7,19 @@ module ActiveModel
# Configuration options may also be set in
# Serializers and Adapters
included do |base|
base.config.array_serializer = ActiveModel::Serializer::ArraySerializer
base.config.adapter = :attributes
base.config.jsonapi_resource_type = :plural
config = base.config
config.collection_serializer = ActiveModel::Serializer::CollectionSerializer
def config.array_serializer=(collection_serializer)
self.collection_serializer = collection_serializer
end
def config.array_serializer
collection_serializer
end
config.adapter = :attributes
config.jsonapi_resource_type = :plural
end
end
end