From cc2b28451c9adb9afa882e35fc44d727dbdbc5d3 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Wed, 28 Dec 2011 16:29:40 -0600 Subject: [PATCH] Add Template.toHtml --- src/stdlib/template.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stdlib/template.coffee b/src/stdlib/template.coffee index d4585a360..77f359c6c 100644 --- a/src/stdlib/template.coffee +++ b/src/stdlib/template.coffee @@ -17,6 +17,9 @@ class Template @build: (attributes) -> (new this).build(attributes) + @toHtml: (attributes) -> + (new this).toHtml(attributes) + build: (attributes) -> @builder = new Builder @content(attributes) @@ -28,6 +31,11 @@ class Template view.initialize?(attributes) view + toHtml: (attributes) -> + @builder = new Builder + @content(attributes) + @builder.toHtml() + wireOutlets: (view) -> view.find('[outlet]').each -> elt = $(this)