Pregunta

I am following a tutorial by Brian Cadarella on DockYard. Building an Ember app with Rails-api backend. http://reefpoints.dockyard.com/ember/2013/01/09/building-an-ember-app-with-rails-api-part-2.html

As soon as I change:

App.UsersIndexRoute = Ember.Route.extend
  setupController: (controller, model) ->
    controller.set('users', model)
    @controllerFor('application').set('currentRoute', 'users')

To:

App.UsersIndexRoute = Ember.Route.extend
  model: ->
    App.User.find()
  setupController: (controller, model) ->
    controller.set('users', model)
    @controllerFor('application').set('currentRoute', 'users')

My link to the users page does not work. I get the following error in my firebug console:

TypeError: Ember.RSVP.reject is not a function
[Break On This Error]   
return Ember.RSVP.reject(error);

Ember.RSVP.reject is in ember-data.js

Why is it not working? I have been following that tutorial word for word.

¿Fue útil?

Solución

This other answer of my is maybe of help for you EmberJS TypeError: Object #<Object> has no method 'reject'… I'm sure if you update your dependencies everything will work.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top