emberjs/ember.js — pull request #9547 by stefanpenner (2014-11-12 02:16:30+00:00)
Title: [Fixes #9541] components which subscribe to actions now throw if they fa...

...il to handle them.

Example:
-------------

```js
// component-a.js
export default Ember.Component.extend({
actions: { }
})
```

```hbs
{{!component-a.hbs}}

Title

{{some-other-component action="saveMe"}}
```

We clearly have subscribed to `some-other-component`'s `action`. Currently, when action is emitted this results in silence, but my intent is absolutely clear. I am subscribing to be notified, I merely have not completed the contract.

This patch provides us with:
```js
throw new Error('component:component-a:4123 had no action handler for: `saveMe`');
```

-----------

Component isolation continues to be in play:

when given:

```hbs
{{!component-a.hbs}}

Title

{{some-other-component}}
```

the `action` is not subscribed to, and as such will continue to remain isolated in the component.

------------------

target dispatch also remains correct

when given:

```hbs
{{!component-a.hbs}}

Title

{{some-other-component action="foo" target=somethingElse}}
```

as expected `somethingElse` will be notified of `action`