Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pushing embedded json into fixture adapter #48

Merged

Conversation

ksykulev
Copy link
Contributor

Users can now push json with embedded records via store.pushPayload while using the fixture adapter.

It supports the following method signatures:

store.pushPayload('user', { id: '1', name: 'john'})
store.pushPayload({
  users: [{ id: '1', name: 'john', project: '1' }],
  projects: [{ id: '1', name: 'ember-data', users: ['1'] }]
})
store.pushPayload('user', {
  users: [{ id: '1', name: 'john', project: '1' }],
  projects: [{ id: '1', name: 'ember-data', users: ['1'] }]
})

Doesn't use serializerFor like the store for non-fixture adapters
So as a side effect:
typeForRoot not yet supported
normalize(Links|Payload|Hash) not yet supported

Users can now push json with embedded records via store.pushPayload
while using the fixture adapter.

It supports the following method signatures:
store.pushPayload('user', { id: '1', name: 'john'})
store.pushPayload({
  users: [{ id: '1', name: 'john', project: '1' }],
  projects: [{ id: '1', name: 'ember-data', users: ['1'] }]
})
store.pushPayload('user', {
  users: [{ id: '1', name: 'john', project: '1' }],
  projects: [{ id: '1', name: 'ember-data', users: ['1'] }]
})

Doesn't use serializerFor like the store for non-fixture adapters
So as a side effect:
  typeForRoot not yet supported
  normalize(Links|Payload|Hash) not yet supported
@danielspaniel danielspaniel merged commit 22d07c9 into adopted-ember-addons:master Jan 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants