I’m having some trouble accessing the store for a DS.FixtureAdapter using Ember App Kit.
My app/adapters/application.coffee
ApplicationAdapter = DS.FixtureAdapter.extend
`export default ApplicationAdapter`
My models/question.coffee
Question = DS.Model.extend
title: DS.attr 'string'
question: DS.attr 'string'
date: DS.attr 'date'
author: DS.attr 'string'
Question.reopenClass
FIXTURES: [
{
id: 101,
title: 'How do I feed hamsters?',
author: 'Tom Dale',
date: '2013-01-01T12:00:00',
question: 'Tomster cant eat using knife and a fork because his hands are \
too small. We are looking for a way to feed him. Any ideas?'
},
{
id: 102,
title: 'Are humans insane?',
author: 'Tomster the Hamster',
date: '2013-02-02T12:00:00',
question: 'I mean are totaly nuts? Is there any hope left for them? Should \
we hamsters try to save them?'
}
]
`export default Question`
My app/routes/questions/index.coffee
QuestionIndexRoute = Ember.Route.extend
model: ->
@.store.findAll('question')
`export default QuestionIndexRoute`
Now every time I try to load the page it errors out with TypeError: undefined is not a function
In Chrome checking the Ember Inspector Data tab, there isn’t any data. Even if I comment out the @.store.findAll('question')
I still wouldn’t see anything.
Been pulling my hair out over this for awhile. Anybody got any suggestions?