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

docs: factory - fix traits example #2176

Merged
merged 1 commit into from
Apr 30, 2021
Merged

Conversation

canrozanes
Copy link
Contributor

The code snippet changed in this PR is described with the following text Here we define a withComments trait that creates 3 comments for a newly created post:

Creating a post requires having a factory on the path mirage/factories/post.js as opposed to mirage/factories/user.js

Also to keep it consistent with the rest of the examples where posts have a property called title, as opposed to name, I went ahead and updated the name property on the factory to be title.

The code snippet changed in this PR is described with the following text `Here we define a withComments trait that creates 3 comments for a newly created post:`

Creating a post requires having a factory on the path `mirage/factories/post.js` as opposed to `mirage/factories/user.js`

Also to keep it consistent with the rest of the examples where posts have a property called `title`, as opposed to `name`, I went ahead and updated the `name` property on the factory to be `title`.
Copy link
Collaborator

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Turbo87 Turbo87 merged commit 965097a into miragejs:master Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants