1
votes

So I've followed instructions here http://edgycircle.com/blog/2014-using-fixtures-in-combination-with-ember-cli/

However, what isn't clear to me is where to specify to use the DS.FixtureAdapter.extend();

I tried placing it in app/adapters/application.js, but no go:

export default DS.FixtureAdapter.extend();

How do I set things up to use fixtures when using ember-cli?

1

1 Answers

1
votes

Did you find an answer for your question? If not: did you import ember-data?

// app/adapters/application.js
import DS from 'ember-data';

export default DS.FixtureAdapter.extend();

Tip: if you miss/comment the import statement, one of the JSHint tests provided by ember-cli (0.0.39) fails:

# See http://0.0.0.0:4200/tests

JSHint - <your-app>/adapters: <your-app>/adapters/application.js should pass jshint (1, 0, 1)

<your-app>/adapters/application.js should pass jshint. <your-app>/adapters/application.js: line 3, col 16, 'DS' is not defined.

Regards!