Skip to content

Re-use Ember Data examples instead of changing types #760

Open
@jenweber

Description

@jenweber

Copied over from emberjs/ember.js#17956 created by @pink-cupcakes:

I wanted to provide feedback on the data models documentation: I would recommend starting in the order of going through CREATE before going through FIND methods. There's nothing to find if you follow the documentation, for example:

this.store.findRecord('blog-post', 1) - returns a 404 for me

Secondly, this wouldn't be such an issue if the examples were consistent. The example for findRecord above is blog-post, but then if you go to the create, update, delete documentation, we have:

store.createRecord('post', { title: 'Rails is Omakase', body: 'Lorem ipsum' });

Or we have a Person model:
person.get('isAdmin'); // => false person.get('hasDirtyAttributes'); // => false person.set('isAdmin', true); person.get('hasDirtyAttributes'); // => true person.changedAttributes(); // => { isAdmin: [false, true] }

Which outside of this chunk, is never referenced anywhere - the example lives in isolation, leaving your mental model of how these methods can interact, incomplete.

These are just feedback from someone new to Ember and trying to figure this out as quickly as possible to POC ideas. Even if the documentation is continuous (borrowing from examples from previous sections), the documentation should be strong enough to stand in isolation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions