[Nitro] Possible improvement to setup_template_transformation pipeline

Chris Farmiloe chris.farmiloe at farmiloe.com
Fri Aug 26 12:36:07 EDT 2005


Hi all:

Problem:

I have the following 'pipeline'

Compiler.setup_template_transform do |template|
   template = Elements.transform(template)
   template = Template.transform(template)
end

if I use the render method "render_template" from a
controller action, this pipeline will not get executed...
leaving all my lovely <this> and <that> elements un-renderd

Solution:

To allow actions to correctly render templates other than their own
using the pipeline, would it be a good idea to move the "pipeline"
setup onto the Template object within glue? this should allow the  
templating
engine to be more versitile on its own, and make the render_template
work as I would expect it to?

ie. Template.setup_template_transform {|t| #some stuff }


Please tell me if there is a good reason for not doing this that I have
neglected to see Or if this can be achieved some other way?


ps: more love to the #nitro :-)

chrisfarms.



More information about the Nitro-general mailing list