Skip to content

Commit

Permalink
Fix incorrect imports from ember-data
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner authored and sivakumar-kailasam committed Jun 25, 2018
1 parent 2e326d6 commit dfe8974
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
9 changes: 6 additions & 3 deletions guides/v1.13.0/models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ example, a `Person` model might have a `firstName` attribute that is a
string, and a `birthday` attribute that is a date:

```javascript {data-filename=app/models/person.js}
import Model, { attr } from "ember-data/model";
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
firstName: attr('string'),
Expand All @@ -208,15 +209,17 @@ example, an `order` may have many `line-items`, and a
`line-item` may belong to a particular `order`.

```javascript {data-filename=app/models/order.js}
import Model, { hasMany } from "ember-data/model";
import Model from 'ember-data/model';
import { hasMany } from 'ember-data/relationships';

export default Model.extend({
lineItems: hasMany('line-item')
});
```

```javascript {data-filename=app/models/line-item.js}
import Model, { belongsTo } from "ember-data/model";
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
order: belongsTo('order')
Expand Down
4 changes: 2 additions & 2 deletions guides/v2.16.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename=app/models/player.js}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -70,7 +70,7 @@ export default Model.extend({

```javascript {data-filename=app/models/user.js}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down
4 changes: 2 additions & 2 deletions guides/v2.17.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename=app/models/player.js}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -70,7 +70,7 @@ export default Model.extend({

```javascript {data-filename=app/models/user.js}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down
4 changes: 2 additions & 2 deletions guides/v2.18.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename="app/models/player.js"}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -71,7 +71,7 @@ export default Model.extend({

```javascript {data-filename="app/models/user.js"}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down
4 changes: 2 additions & 2 deletions guides/v3.0.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename=app/models/player.js}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -71,7 +71,7 @@ export default Model.extend({

```javascript {data-filename=app/models/user.js}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down
4 changes: 2 additions & 2 deletions guides/v3.1.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename=app/models/player.js}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -73,7 +73,7 @@ export default Model.extend({

```javascript {data-filename=app/models/user.js}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down
4 changes: 2 additions & 2 deletions guides/v3.2.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename=app/models/player.js}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -73,7 +73,7 @@ export default Model.extend({

```javascript {data-filename=app/models/user.js}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down
4 changes: 2 additions & 2 deletions guides/v3.3.0/testing/testing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new `levelName` when the player reaches level 5.
```javascript {data-filename=app/models/player.js}
import Model from 'ember-data/model';
import { attr } from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
level: attr('number', { defaultValue: 0 }),
Expand Down Expand Up @@ -73,7 +73,7 @@ export default Model.extend({

```javascript {data-filename=app/models/user.js}
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
profile: belongsTo('profile')
Expand Down

0 comments on commit dfe8974

Please sign in to comment.