You can pass any string to the haml engine to render it to html:
html = Haml::Engine.new(my_haml_content).render

You can pass options to
it if you need to, your normal haml options will not be used if you don't.
You can also pass an object as the evaluation context.

Oh look. you found the link I was about to paste. ;-)

On Fri, Jun 19, 2009 at 4:14 PM, steve <[email protected]> wrote:

>
> I want to create a string based off of a haml template to be inserted
> as text into the database.  Wondering if anyone has done this, before
> I dig into the templating code?
>
> Much thanks,
> Steve
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to