This is the same question as this one or this one, but it seems that the code generated by ember-cli
has changed. This is my current system:
» ember --version
version: 0.1.2
node: 0.10.25
npm: 2.1.3
This is the full content of my book model file (models/book.js
):
import DS from 'ember-data';
export default DS.Model.extend({
'title': DS.attr('string'),
'author': DS.attr('string'),
});
The replies to the other questions and this post tell me to use reopenClass
, but with the current format of the model file there is nothing for me to reopen.
I have tried doing:
import DS from 'ember-data';
export default DS.Model.extend({
'title': DS.attr('string'),
'author': DS.attr('string'),
FIXTURES : [
{
id: 1,
title: "Protector",
author: "Larry Nieven"
},
{
id: 2,
title: "The greatest book ever",
author: "Juan"
}
]
});
But no luck. How can I define fixtures?