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

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, but is dynamic with bin/camping.
Best of both worlds?

On May 9, 2010 12:43 AM, "Philippe Monnet" <> wrote:

 I gave Magnus' excellent integration of Tilt a whirl today and really love
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.


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


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:

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


Camping-list mailing list
Camping-list mailing list

Reply via email to