Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EmberJS TypeError: Object #<Object> has no method 'reject'

i've setup this app with ember and i'm getting this weird message:

TypeError: Object # has no method 'reject'

here's my EmberJS app config:

App = Ember.Application.create();

App.Store = DS.Store.extend({
    revision: 12,
    adapter: DS.RESTAdapter.extend({
        url: 'http://localhost:8080',
        namespace: '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b'
    })
});

App.Router.map(function() {
    this.resource('collections');
});

App.IndexRoute = Ember.Route.extend({
    redirect: function(){
        this.transitionTo('collections');
    }
});

App.CollectionsRoute = Ember.Route.extend({
    model: function(){
        return App.Collection.find();
    }
});

App.Collection = DS.Model.extend({
    name: DS.attr('string'),
    createdAt: DS.attr('date')
});

Any ideas? :(

like image 714
Pedro Costa Neves Avatar asked May 03 '13 23:05

Pedro Costa Neves


1 Answers

The problem seams to be that you are using the wrong ember/ember-data files combinations... this should work:

http://builds.emberjs.com.s3.amazonaws.com/ember-latest.js http://builds.emberjs.com.s3.amazonaws.com/ember-data-latest.js

you can get here the latest builds: http://builds.emberjs.com

hope it helps

like image 172
intuitivepixel Avatar answered Oct 17 '22 14:10

intuitivepixel