mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Adjusts JsonApi adapter to serialize attributes in a nested attributes hash
This commit is contained in:
@@ -166,10 +166,12 @@ module ActionController
|
||||
|
||||
expected = {
|
||||
data: {
|
||||
name: "Name 1",
|
||||
description: "Description 1",
|
||||
id: assigns(:profile).id.to_s,
|
||||
type: "profiles"
|
||||
type: "profiles",
|
||||
attributes: {
|
||||
name: "Name 1",
|
||||
description: "Description 1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,10 +184,12 @@ module ActionController
|
||||
|
||||
expected = {
|
||||
data: {
|
||||
name: "Name 1",
|
||||
description: "Description 1",
|
||||
id: assigns(:profile).id.to_s,
|
||||
type: "profiles"
|
||||
type: "profiles",
|
||||
attributes: {
|
||||
name: "Name 1",
|
||||
description: "Description 1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,10 +221,12 @@ module ActionController
|
||||
expected = {
|
||||
data: [
|
||||
{
|
||||
name: "Name 1",
|
||||
description: "Description 1",
|
||||
id: assigns(:profiles).first.id.to_s,
|
||||
type: "profiles"
|
||||
type: "profiles",
|
||||
attributes: {
|
||||
name: "Name 1",
|
||||
description: "Description 1"
|
||||
}
|
||||
}
|
||||
],
|
||||
meta: {
|
||||
|
||||
Reference in New Issue
Block a user