Thanks for testing it out ;)

I agree: we can't cache templates in development and you shouldn't need to
set an option for that, however we also want Camping to be speedy
out-of-box.

What about applying your patch, but also make bin/camping set
:dynamic_templates to true if it's not set already?

If you want to force caching (or force not-caching) in your app, you simply
set :dynamic_templates, true/false. And if you don't, it compiles if you
i.e. run it through a configuration.ru, but is dynamic with bin/camping.
Best of both worlds?

On May 9, 2010 12:43 AM, "Philippe Monnet" <r...@monnet-usa.com> wrote:

 I gave Magnus' excellent integration of Tilt a whirl today and really love
it.
It's also cool because you can match different types of templates at the
same time (e.g. Markaby + HAML).

I found that while prototyping it would be nice to not have Camping compile
and cache Tilt templates.
So I used the new option capability and defined a :dynamic_templates option.

e.g.:

module TiltTest
    set :views, File.dirname(__FILE__) + '/views'
    set :dynamic_templates, true

    #...
end

I changed the Camping code to check for that option and only compile and
cache if false.
What do you think?
Maybe we need a shorter or different name for the option?

I checked in the changes in my fork:
http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764

Magnus, you might have some additional ideas for tweaking this feature. So
feel free to add/alter and merge to your liking.

Philippe

_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to