Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Help with how is Template handler works for rails 2.2.2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
cmo-0  
View profile  
 More options Jan 23 2009, 12:06 pm
From: cmo-0 <amal...@gmail.com>
Date: Fri, 23 Jan 2009 09:06:35 -0800 (PST)
Local: Fri, Jan 23 2009 12:06 pm
Subject: Help with how is Template handler works for rails 2.2.2
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).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Koziarski  
View profile  
 More options Jan 24 2009, 9:37 pm
From: Michael Koziarski <mich...@koziarski.com>
Date: Sun, 25 Jan 2009 15:37:29 +1300
Local: Sat, Jan 24 2009 9:37 pm
Subject: Re: [Rails-core] Help with how is Template handler works for rails 2.2.2

> 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).

Josh is the guy who knows the most about the current api.  He'll be
able to give you an official answer.

However my hunch is that you'll have to manually set the relevant
headers for X-Sendfile and render an empty string.  If you're not
using X-Sendfile maybe you'll need to duplicate the behaviour that we
have in streaming.rb.

Given that revisiting the template API is one of yehuda's goals for
3.0, it could also be a good time to start thinking about additions to
the API to support this kind of thing.

--
Cheers

Koz


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »