emberjs/ember.js — pull request #2391 by lukemelia (2013-04-03 15:57:15+00:00)
Title: Enhance Ember.TargetActionSupport and introduce Ember.ViewTargetActionSupport

Enhancements to `Ember.TargetActionSupport` now allow `triggerAction` to receive an object specifying the desired action name and target. A target and/or action provided in the function call take precedence over any target/action properties in the object.

`Ember.ViewTargetActionSupport` is a new mixin that encompasses `Ember.TargetActionSupport` and complements it by defining the default `target` as the view's `controller` and the default `actionContext` as the view's `context`.

This is an extraction from the approach we have used on a few Yapp projects in production and it has worked well for us. In particular, it is useful when you are handling multiple DOM events on a view class and want to dispatch different actions in response to them.