Skip to content

Instantly share code, notes, and snippets.

@jimrubenstein
Last active December 19, 2015 02:38
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 jimrubenstein/5884577 to your computer and use it in GitHub Desktop.
Save jimrubenstein/5884577 to your computer and use it in GitHub Desktop.
Views = {
render: function(template, data)
{
if (undefined == JST)
{
throw new Error("JST Templates unavailable");
}
if (undefined == JST[ template ])
{
throw new Error("JST template " + template + " undefined");
}
return JST[ template ]( data );
},
render_fn: function(template)
{
return function(data)
{
return Views.render(template, data);
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment