wycats/handlebars.js — pull request #383 by leshill (2012-12-07 06:00:08+00:00)
Title: Resolve possible lambdas for partials

Hi @wycats,

I just ran across this today. We are using fairly complex context objects and wanted to invoke a partial with a context that was a lambda not a property. Let me illustrate with a completely contrived example. WIth this context:

{ first: function() { return this.data[0]}, data: [{name: 'Handlebars'}]};

And this partial invocation:

{{> partial first}}

The result for a simple partial of `Name: {{name}}` should be "Name: Handlebars".

This might resolve #182 and remove the need for #368

I am bummed that I missed the `ember.js` talk, if you are around Seattle tomorrow (Friday) I would like to buy you a coffee at Victrola on Pike (really great coffee).