[Nitro] Patch review

James Britt james.britt at gmail.com
Thu Jun 28 11:12:55 EDT 2007

Jonathan Buch wrote:
> Hi George,
> as per request, I looked through patches.
> [Check if template exists, else use app/template. Fixes WSOD problem in  
> blog [james_b].
> George Moschovitis <george.moschovitis at gmail.com>**20070626112108] {
> I find this one a little dubious.  While this certainly fixes the problem,
> I think it's more fixing a symptom, and not the original cause.

Quite true.  I was simply trying to get it work for me as I thrashed about.

> IMO we should stay with only '/template' as default, it's easy enough
> to change the template root by hand, and making a special case for
> a single example is the wrong way around.  IMO of course.  So, what
> I would propose is, move the template folder to the correct place
> or showcase template root overriding in the example.

I would prefer that there be a single default, and would like to see how 
one can change that in their config or app.rb code.

A nice example might be to show how one could load templates from one or 
another directory to serve up localized content.  Perhaps read the 
sub-domain from the request URL and use that to pull templates in a a 
particular language:

    gr.foo.com -> Template.root = localized/gr/template

James Britt

http://www.rubyaz.org         - Hacking in the Desert
http://www.jamesbritt.com     - Playing with Better Toys

More information about the Nitro-general mailing list