Add symbol support for ActiveModel::Serializer.type method

The ActiveModel::Serializer.type method now accepts symbol as paremeter:
class AuthorSerializer < ActiveModel::Serializer
  type :profile
end
The test file for the type was also refactored.
This commit is contained in:
Yohan Robert
2016-02-13 14:08:40 +01:00
committed by Yohan Robert
parent f02f0849b1
commit 727d7631ae
5 changed files with 83 additions and 73 deletions

View File

@@ -3,6 +3,8 @@
Breaking changes:
Features:
- [#1515](https://github.com/rails-api/active_model_serializers/pull/1515) Adds support for symbols to the
`ActiveModel::Serializer.type` method. (@groyoh)
- [#1504](https://github.com/rails-api/active_model_serializers/pull/1504) Adds the changes missing from #1454
and add more tests for resource identifier and relationship objects. Fix association block with link
returning `data: nil`.(@groyoh)