bertramdev/asset-pipeline — pull request #76 by tednaleid (2014-03-25 00:55:16+00:00)
Title: Deferred scripts that have nested taglibs in them don't render

This patch fixes an issue in the current `` tag that causes it to emits empty `` tags if the body of the deferred script has any groovy expressions or nested tag lib calls in it.

This works:

console.log("hello world");
...

This doesn't:

console.log("hello world");
...

This is because for the simple case, grails returns an object type that has a `toString` method on it that does what you'd expect it to.

For the more complex, nested ones, it returns some sort of closure that needs to be evaluated to get the string value.

The attached patch fixes this issue (and has supporting tests) and works for both cases.