-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update the API docs for snapshots #4638
Conversation
|
||
export default DS.Adapter.extend({ | ||
createRecord: function(store, type, snapshot) { | ||
var data = this.serialize(snapshot, { includeId: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use snapshot.serialize ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I copied and pasted from the adapter docs and forgot to edit this line. Updated.
import DS from 'ember-data' | ||
|
||
export default DS.JSONAPIAdapter.extend({ | ||
shouldReloadAll: function(store, snapshotRecordArray) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 method shorthand: shouldReloadAll(store, snapshotRecordArray) {
.
import MyCustomAdapter from './custom-adapter'; | ||
|
||
export default MyCustomAdapter.extend({ | ||
findAll: function(store, type, sinceToken, snapshotRecordArray) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 method shorthand: findAll(store, type, sinceToken, snapshotRecordArray) {
.
import DS from 'ember-data'; | ||
|
||
export default DS.Adapter.extend({ | ||
findAll: function(store, type, snapshotRecordArray) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 method shorthand: findAll(store, type, snapshotRecordArray) {
.
import DS from 'ember-data' | ||
|
||
export default DS.JSONAPIAdapter.extend({ | ||
shouldReloadAll: function(store, snapshotArray) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 method shorthand: shouldReloadAll(store, snapshotArray) {
.
import DS from 'ember-data'; | ||
|
||
export default DS.Adapter.extend({ | ||
createRecord: function(store, type, snapshot) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 method shorthand: createRecord(store, type, snapshot) {
.
@locks did these changes address your issues? |
No description provided.