Adjusts JsonApi adapter to serialize attributes in a nested attributes hash

This commit is contained in:
Benedikt Deicke
2015-05-21 16:23:01 +02:00
parent 5f05944826
commit ca41901fb8
11 changed files with 148 additions and 78 deletions

View File

@@ -43,7 +43,9 @@ module ActiveModel
expected = [{
id: "1",
type: "comments",
body: 'ZOMG A COMMENT',
attributes: {
body: 'ZOMG A COMMENT'
},
links: {
post: { linkage: { type: "posts", id: "1" } },
author: { linkage: nil }
@@ -51,7 +53,9 @@ module ActiveModel
}, {
id: "2",
type: "comments",
body: 'ZOMG ANOTHER COMMENT',
attributes: {
body: 'ZOMG ANOTHER COMMENT'
},
links: {
post: { linkage: { type: "posts", id: "1" } },
author: { linkage: nil }