Skip to content

Instantly share code, notes, and snippets.

@NetguruGist
Created November 3, 2015 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetguruGist/b70d5f33f60ea12c8fd2 to your computer and use it in GitHub Desktop.
Save NetguruGist/b70d5f33f60ea12c8fd2 to your computer and use it in GitHub Desktop.
serializers5 ruby
[json response]
data: {
id: 1,
type: "users",
attributes: { name: "John" },
relationships: {
notes: [
{ id: 1, type: "notes" },
{ id: 2, type: "notes" }
]
}
},
included: [
{ id: 1, type: ’notes’, attributes: { body: ’Lorem ipsum.’ } },
{ id: 2, type: ’notes’, attributes: { body: ’Dolor sil amet.’ } },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment