Skip to content

Instantly share code, notes, and snippets.

@garth
Created December 3, 2014 20:08
Show Gist options
  • Save garth/a8e5dc8804cbe43efc2f to your computer and use it in GitHub Desktop.
Save garth/a8e5dc8804cbe43efc2f to your computer and use it in GitHub Desktop.
Ember.Handlebars.registerBoundHelper('render-dynamic', function (name, context, options) {
// name was passed as a variable, but should be passed to render as a string
options.types[0] = "STRING";
return Ember.Handlebars.helpers.render.call(this, name, context, options);
});
{{#each section in sections}}
{{render-dynamic section.templatePath "content"}}
{{/each}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment