bug0r
bug0r

Reputation: 613

Ember.js Object #<Object> has no method 'resolve' (jsFiddle inside)

I have code (http://jsfiddle.net/bug0r/94h3a/17/)

There is error when data loading by rest.api - Object #<Object> has no method 'resolve'

Could you help to find an error?

ember - https://raw.github.com/emberjs/ember.js/release-builds/ember-1.0.0-rc.3.js

    

var A = window.App = Ember.Application.create({
    VERSION: '1.0',
    rootElement: '#appRoot',
    LOG_TRANSITIONS: true
});
A.deferReadiness(); // do not initialize it until we are ready

A.Adapter = DS.RESTAdapter.extend({
    namespace: 'api',
    url: 'http://bug0r.apiary.io'
});
A.Adapter.map('Semantic', {
    primaryKey: 'Key'
});
A.Store = DS.Store.extend({
    revision: 12,
    adapter: A.Adapter
});

A.Router.map(function () {
    // each call will create Ember.Route instance for customizing route
    this.resource("semantic", {
        path: "/"
    });
    this.route("about", {
        path: "/about"
    });
    this.route("favorites", {
        path: "/favs"
    });
});

A.SemanticRoute = Ember.Route.extend({
    model: function () {
        return A.Semantic.find();
    }
});

/* Symantic model*/
A.Semantic = DS.Model.extend({
    Key: DS.attr('string'),
    Name: DS.attr('string'),
});

A.advanceReadiness(); // ready for initialization


Upvotes: 1

Views: 709

Answers (1)

sly7_7
sly7_7

Reputation: 12011

In the fiddle, you are using ember-rc3 combined with ember-data latest. I think they are not compatible. So try to use ember-latest too, it should work.

EDIT: the latest ember build is http://builds.emberjs.com.s3.amazonaws.com/ember-latest.js the latest ember-data build is http://builds.emberjs.com.s3.amazonaws.com/ember-data-latest.js

BE CAREFULL These builds are the last succesfull builds, passing all of the tests, but there no warranty they are bug-free.

Upvotes: 4

Related Questions