Skip to content

Commit

Permalink
Merge pull request #2176 from canrozanes/patch-1
Browse files Browse the repository at this point in the history
docs: factory - fix traits example
  • Loading branch information
Turbo87 authored Apr 30, 2021
2 parents f0ce745 + 3e2a6bb commit 965097a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/dummy/app/pods/docs/data-layer/factories/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,11 @@ When combined with the `afterCreate()` hook, traits simplify the process of sett
Here we define a `withComments` trait that creates 3 comments for a newly created post:

``` js
// mirage/factories/user.js
// mirage/factories/post.js
import { Factory, trait } from 'ember-cli-mirage';

export default Factory.extend({
name: 'Lorem ipsum',
title: 'Lorem ipsum',

withComments: trait({
afterCreate(post, server) {
Expand Down

0 comments on commit 965097a

Please sign in to comment.