emberjs/ember.js — pull request #4658 by hyderali (2014-04-05 15:23:27+00:00)
Title: [BUGFIX Beta] Lookup actionName in context instead of target

The `actionName` lookup introduced in #3936 now looks up `actionName` in the target.

But while iterating over an array using the each helper, and if the actionName is given as a bound property, the actionName should be looked up on the context, not the controller.

```javascript
App.IndexController = Ember.ArrayController.extend({
allactions: [{title: 'Alert 1',name: 'alert1'},
{title: 'Alert 2',name: 'alert2'},
{title: 'Alert 3',name: 'alert3'}],
actions: {
alert1: function(){
alert('clicked 1');
},
alert2: function(){
alert('clicked 2');
},
alert3: function(){
alert('clicked 3');
}
}
});
```
with template

```html
{{#each allactions}}
{{title}}
{{/each}}
```

Clicking the Alert1 button should look up `name` property in the context and resolve to `alert1` and should not look up on the target (controller).

Failing jsbin [here](http://emberjs.jsbin.com/gegob/4/edit)