Skip to content

Instantly share code, notes, and snippets.

@richmolj
Created April 4, 2017 17:48
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 richmolj/1ac2cb3e4b0fdc998d9558bbfed38f46 to your computer and use it in GitHub Desktop.
Save richmolj/1ac2cb3e4b0fdc998d9558bbfed38f46 to your computer and use it in GitHub Desktop.
data: {
type: 'authors',
attributes: { first_name: 'Stephen', last_name: 'King' },
relationships: {
books: {
:"added-data" => [
{
:"temp-id" => "abc123",
type: 'books',
}
]
}
}
},
included: [
{
type: 'books',
:'temp-id' => 'abc123',
attributes: {
title: 'The Shining'
},
relationships: {
tags: {
:"added-data" => [
{
:'temp-id' => 'def456',
type: 'tags'
}
]
}
}
},
{
type: 'tags',
:'temp-id' => 'def456',
attributes: {
name: 'Scary'
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment