Skip to content

Commit

Permalink
fixed serialize example (#6816)
Browse files Browse the repository at this point in the history
I saw in the [documentation](https://api.emberjs.com/ember-data/release/modules/@ember-data%2Fserializer) the example code for the `serialize` method and it shows the `snapshot.id` property as a function instead of a string. I [double checked it](https://github.com/emberjs/data/blob/master/packages/store/addon/-private/system/snapshot.js#L65) to be sure it is just a string :) I hope this is the right place to make the fix to the documentation.
  • Loading branch information
MarcoUmpierrez authored and runspired committed Nov 27, 2019
1 parent 72dd585 commit d0dad1b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
serialize(snapshot, options) {
const serializedResource = {
id: snapshot.id(),
id: snapshot.id,
type: snapshot.modelName,
attributes: snapshot.attributes()
};
Expand Down

0 comments on commit d0dad1b

Please sign in to comment.