# Help with making TemplateHandlers for rails 2.2.2

**URL:** <https://www.ruby-forum.com/t/help-with-making-templatehandlers-for-rails-2-2-2/158432>\
**Category:** Rails\
**Created:** [January 23, 2009, 8:37am UTC](https://www.ruby-forum.com/t/help-with-making-templatehandlers-for-rails-2-2-2/158432 "2009-01-23T08:37:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmo-0](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@cmo-0](https://www.ruby-forum.com/u/cmo-0)\
**Post date:** [January 23, 2009, 8:37am UTC](https://www.ruby-forum.com/t/help-with-making-templatehandlers-for-rails-2-2-2/158432/1 "2009-01-23T08:37:08Z")

</div>

Hi,  
i want to create a custom template handler for an intranet app.

the template handler will be like erb template (maybe inherent from  
ERB handler), but the final substituted result will be passed to some  
unix tools for generating the final result.

looking at the source of rails template handlers. i understand that  
any template handler should inhernt from TemplateHandler and define  
compile method that will build a string of ruby code to be handed over  
to rails for evaluation, and finally send the final result of this  
evaluation to the client.

MY problem is: the final result will be a generated file on the  
filesystem, and i couldn’t figure how to throw send\_file in the mix. i  
looked at prawnto, rjs, builder and fleximage plugins. but all do not  
generate results on the filesystem (aka do not use send\_file).
