search for: liquid_body

Displaying 1 result from an estimated 1 matches for "liquid_body".

2006 May 16
2
liquid: passing objects
I''ve got Liquid installed and maybe since I''m not coming in with Django experience, I''m completely mystified by how to pass anything worthwhile to a template. In my controller: def preview @customer = Customer.find(1) @letter = Letter.find(1) @liquid_body = Liquid::Template.parse(@letter.body) @x = @liquid_body.render(''fname'' => @customer.fname, ''customer'' => @customer) @draft = render_to_string(:inline => @x) end In the view: <%= draft -%> In my template stored in the DB:...