Written by Sean Behan on Sun Jun 17th 2012

I'm working on a project that requires users/designers be allowed to edit the layout of their site. I'm using Liquid, Ruby templating system developed by the folks at shopify.com.

Doing a little searching I found this great post http://giantrobots.thoughtbot.com/2008/10/3/custom-tags-in-liquid The liquid documentation itself needs a little more work. But you can check it out here if you want http://wiki.github.com/tobi/liquid/liquid-for-programmers.

I worked through the example at thoughtbot blog and was having trouble with the final step, rendering the partial to the screen. The solution was really a simple step I wasn't thinking about. Nonetheless, the information for some reason was kept out of the post and burried in the comments.

<%= Liquid::Template.parse(template).render({}, :registers=>{:controller => controller} %>

Tagged with..
#liquid #Rails #ruby #Ruby on Rails

Just finishing up brewing up some fresh ground comments...