emberjs/ember.js — pull request #1998 by josepjaume (2013-02-09 18:07:11+00:00)
Title: `itemController` and `linkTo`

I've found a use case with `itemController` that probably needs to be tackled.

I have the following controllers:

```javascript
App.UsersController = Ember.ArrayController.extend({
itemController: 'user'
});

App.UserController = Ember.ArrayController({
someApplicationStateProperty: true,
someAction: function(){}
});
```

And from the Users template:

```html
{{#collection contentBinding="this"}}
{{#linkTo user view.content}}{{view.content.name}}{{/linkTo}}
{{/collection}}
```

The this is; the `UserRoute` will receive an instance of the controller, and not the model itself. This effectively ends up as an infinite loop at some point.

The workaround I've found is to call the `linkTo` helper this way:

```html
{{#linkTo user view.content.content}}...{{/linkTo}}
```

This looks rather verbose though.

My guess is that this should be either `linkTo`'s responibility or maybe `UserRoute`'s using the `isController` property.

What do you think?