Permalink
Browse files

Add documentation for the action helper's context argument

  • Loading branch information...
ebryn committed May 18, 2012
1 parent 885c5d3 commit cdfb4673c80c17203f940f9c2087661a9116880a
Showing with 13 additions and 0 deletions.
  1. +13 −0 packages/ember-handlebars/lib/helpers/action.js
@@ -140,6 +140,19 @@ ActionHelper.registerAction = function(actionName, eventName, target, view, cont
will be created when a new `Ember.Application` is created. Having an instance of
`Ember.Application` will satisfy this requirement.
### Specifying a context
By default the `{{action}}` helper passes the current Handlebars context along in the
`jQuery.Event` object. You may specify an alternative object to pass as the context by
providing a property path:
<script type="text/x-handlebars" data-template-name='a-template'>
{{#each person in people}}
<div {{action "edit" context="person"}}>
click me
</div>
{{/each}}
</script>
@name Handlebars.helpers.action
@param {String} actionName
@param {Hash} options

0 comments on commit cdfb467

Please sign in to comment.