Hi,

I second Bryan's suggestion, Dryml works really well to be used
standalone. I use it to generate some templates for printing. In one of
my models, I have a piece of code like this (I have a general library of
tags, and then one specific per template type):

template = "app/views/attachments/templates/template_#{type}.dryml"
library = "app/views/attachments/templates/lib_templates.dryml"

return Dryml.render(File.read(library)+File.read(template), {:this => self})

This way inside Dryml, "this" will become the model instance I'm working
with at the moment.

Warm regards,
Ignacio

El 03/07/14 21:50, Bryan Larsen escribió:
> You should be able to do something like:
> 
> Dryml.render("<html><%= this %></html>", {:this => something})
> 
> Bryan
> 
> 
> On Thu, Jul 3, 2014 at 3:32 PM, umuro <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     For *ERB* you can do this:  
>     |
>      
> template=ERB.newFile.new("app/views/oeb_stylesheets/show.css.erb").read,nil,"%"
> 
>     |
>     Is there a way to do it for *DRYML*?
> 
>     -- 
>     You received this message because you are subscribed to the Google
>     Groups "Hobo Users" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to [email protected]
>     <mailto:[email protected]>.
>     To post to this group, send email to [email protected]
>     <mailto:[email protected]>.
>     Visit this group at http://groups.google.com/group/hobousers.
>     For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to