how to insert HAML via function into template?

1 view
Skip to first unread message

Ming

unread,
Nov 5, 2009, 12:32:11 AM11/5/09
to Haml
I'm using HAML in a merb project.

I have function generated HTML that I wish to convert to HAML and
insert into a HAML template.

convert(html) returns haml

All the naive methods I've tried at best insert the converted haml as
a string into the rendered html rather than including it as code for
the template. How do I get the function inserted haml to be treated
as code?

Alternatively, I would be happy to insert the function generated HTML
into the final rendered page without going through HAML. Is this
possible?

TIA

Nathan Weizenbaum

unread,
Nov 5, 2009, 2:26:49 AM11/5/09
to ha...@googlegroups.com
Why can't you just use "= html" in your template?

Ming

unread,
Nov 5, 2009, 7:18:39 AM11/5/09
to Haml
Nathan, big duh! I tried everything but the obvious. Thanks.
Reply all
Reply to author
Forward
0 new messages