Skip to content

Instantly share code, notes, and snippets.

@aroman
Created May 13, 2012 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aroman/2675700 to your computer and use it in GitHub Desktop.
Save aroman/2675700 to your computer and use it in GitHub Desktop.
Case in point
Handlebars.registerHelper('course_options', function (course_id) {
str = "";
_.each(courses.pluck("_id"), function (current_id) {
str += "<option";
if (current_id === course_id) {
str += " selected";
}
str += ">" + courses.get(current_id).get('title') + "</option>\n";
});
return str;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment