mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix fields option to restrict relationships as well.
This commit is contained in:
@@ -56,7 +56,7 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def test_limiting_linked_post_fields
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer, include: [:post], fields: { post: [:title] })
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer, include: [:post], fields: { post: [:title, :comments, :blog, :author] })
|
||||
expected = [{
|
||||
id: '42',
|
||||
type: 'posts',
|
||||
|
||||
Reference in New Issue
Block a user