emberjs/ember.js — pull request #905 by frodsan (2012-05-29 22:41:07+00:00)
Title: urlFor should raise an error when route property is not defined

Having this code in `app_router.js`:

root: Ember.State.extend({
index: Ember.State.extend({
route: '/',

connectOutlets: function(router) {
router.get('applicationController').connectOutlet(App.HomeView);
},

showUsers: Ember.State.transitionTo('users')
}),

users: Ember.State.extend({}) // state without route property
});

and the following template:

Users

It returns a `TypeError`: *Cannot call method 'generate' of undefined*.
This change check if the route property is defined, if it's not raises
an error like: 'route property is not defined for path'.