emberjs/ember.js — pull request #1838 by joeytrapp (2013-01-21 20:09:10+00:00)
Title: Calling this.render() in renderTemplate() more than once breaks default into value.

In situations where you may want to call `this.render()` more than once within `renderTemplate()`, the default `into` option will get set to unexpected values depending on the order that `this.render()` is called. For this example, the application.handlebars will have two outlets, one with the name menu.

``` javascript
App.Router.map(function() {
this.resource('posts', function() {});
});

App.PostsRoute = Ember.Route.extend({
renderTemplate: function() {
this.render();
this.render('posts/menu', {
into: 'application',
outlet: 'menu'
controller: 'postsMenu'
});
}
});
```

The fix is to only set lastRenderedTemplate to the template/view name if it is getting set to the `main` outlet.