Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Handlebars hash arguments as optional arguments support #289

merged 1 commit into from Dec 21, 2012


None yet
2 participants


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

function urlFor(options<String/Object>)

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 added a commit that referenced this pull request Dec 21, 2012

@larzconwell larzconwell Merge pull request #289 from zinoviev/master
Handlebars hash arguments as optional arguments support

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


larzconwell commented 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


larzconwell commented Dec 22, 2012

I'll get it

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