Fix fields option to restrict relationships as well.

This commit is contained in:
Lucas Hosseini
2015-10-24 20:22:55 +02:00
parent f3403c302c
commit 13ef8fed1b
5 changed files with 96 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ module ActiveModel
def test_limiting_fields
actual = ActiveModel::SerializableResource.new(
[@first_post, @second_post], adapter: :json_api,
fields: { posts: ['title'] })
fields: { posts: %w(title comments blog author) })
.serializable_hash
expected = [
{