Using the latest (from GitHub today) Ember and Ember Data, this code is giving me an error - Uncaught TypeError: Cannot read property 'find' of undefined at ember-data-latest.js:3170
// only needed on JSFiddle; this is to trigger the route
history.pushState("", "", "/projects/1/tasks");
App = Ember.Application.create({});
App.store = DS.Store.extend({
revision: 4,
adapter: DS.RESTAdapter.create()
});
App.Project = DS.Model.extend({
name: DS.attr('string')
});
App.ApplicationController = Ember.ObjectController.extend({
});
App.ApplicationView = Ember.View.extend({
templateName: 'application'
});
App.TasksView = Ember.View.extend({
templateName: 'tasks'
});
App.Router = Ember.Router.extend({
root: Ember.Route.extend({
tasks: Ember.Route.extend({
route: '/projects/:project_id/tasks',
connectOutlets: function(router) {
router.get('applicationController').connectOutlet('Tasks');
}
})
})
});
App.router = App.Router.create({
location: 'history'
});
App.initialize(App.router);
Changing :projects_id in the route to something else (e.g. 1, so it matches the URL) fixes this, but of course that's not very useful.
Can anyone shed some light on what's going on here? Thanks!