Handlebars hash arguments as optional arguments support #289

merged 1 commit into from Dec 21, 2012

2 participants



in geddy templates helpers where are lot of usage options objects like in

function urlFor(options)

We can't just pass JS object as argument inside template in handlebars,
but where are optional hash arguments for this, see handlebars documentation for reference


Issue: handlebars pass wrapped option object argument like this to geddy's function expecting plain options:
{ hash : { foo : 'bar', baz : 'bla' }}

With this fix we can use predefined geddy helpers with handlebars in clean way:

{{{urlFor host="mysite.com" controller="main" action="index" }}}

@larzconwell larzconwell merged commit 875bfb2 into geddy:master Dec 21, 2012

This is awesome, had no idea you could do that. Merged, thanks a bunch!


Ooops, seems I forgot tot remove console.log on line 89 in test/template/engines/handlebars_mustache.js


I'll get it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment