emberjs/ember.js — pull request #1756 by ivanvanderbyl (2013-01-11 02:08:53+00:00)
Title: Fixed setupView to avoid blowing away view template if router fails to lookup a template

Because it is possible to tell the route which view to render, we shouldn't blatantly try to set the template on this view, especially if we fail to find a template with the same name as the view.

Example:

```js
App.PostSummaryView = Ember.View.extend({
templateName: 'my_custom_post'
});

App.PostsPostRoute = Ember.Route.extend({
renderTemplate: function(controller, model) {
this.render('postSummary');
}
});
```

Previously this would look for a template called `post_summary`, which would return undefined. `setupView` would then set `template` on `App.PostSummaryView` to `undefined`.