1
votes

Using

DEBUG: -------------------------------
DEBUG: Ember : 1.5.1
DEBUG: Handlebars : 1.3.0
DEBUG: jQuery : 1.10.2
DEBUG: -------------------------------

I get error:

Error while loading route: Error: Assertion Failed: You tried to load all records but you have no adapter (for story)

Trying to update the repo found in this tutorial to latest ember install.

Repo with my updates

I have defined my store (app/assets/javascript/store.js.coffee) like

App.Store = DS.Store.extend
  adapter: '-active-model'
  namespace: 'api/v1'

2

2 Answers

0
votes

Defining the store/adapter in this fashion is deprecated since 1.0 beta 1, you should upgrade to at least 1.0 beta 7. The adapter(s) should be defined like this now:

Site Wide:

App.ApplicationAdapter = DS.ActiveModelAdapter.extend({
  namespace: 'api/v1'
});

Model Specific:

App.PostAdapter = DS.RESTAdapter;

App.DogAdapter = DS.FixtureAdapter.extend({
  host: 'www.foo.com'
});

More details can be found in the transition document

https://github.com/emberjs/data/blob/master/TRANSITION.md

0
votes

It appears if i download v1.0.0-beta.7 of ember-data and put it in the vendor directory along with the changes above it works