Skip to content

Instantly share code, notes, and snippets.

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