bones icon indicating copy to clipboard operation
bones copied to clipboard

Figure out template partials with Underscore 1.2.x

Open yhahn opened this issue 14 years ago • 4 comments

Our current system of using the this scope for handling template partials seems to be bust with underscore 1.2.2+ changes where this in the context of a template is no longer the templates object. We need a new approach or a way to repair the scope of our template functions back to the templates object.

If we do make a breaking change for this it should belong in 2.x with 1.x staying on underscore 1.x.

/cc @kkaefer @tmcw @willwhite

yhahn avatar Dec 01 '11 18:12 yhahn

This is fixed in documentcloud/underscore#372.

kkaefer avatar Dec 02 '11 17:12 kkaefer

Looks like it's made its way into Underscore 1.2.3. Just need to update, test, and release now.

yhahn avatar Dec 12 '11 17:12 yhahn

I temporarily upgraded to underscore 1.3.3 since it transparently worked with all other apps - but it broke template rendering. Now finding this. Just tracking that I've reverted back to 1.1.x in https://github.com/developmentseed/bones/commit/2a58afb0c3421927e703b34e4ca1dc28c74f60cf

springmeyer avatar Apr 17 '12 00:04 springmeyer

see also #43

springmeyer avatar Apr 17 '12 00:04 springmeyer