Reputation: 1
Im trying to use the following command on a controller:
String html = g.render(template: 'etiqueta', model: [user: user])
It works perfectly on another project of mine, using Grails 3.3.1. But on Grails 3.2.8 it doens't work! I'm trying to find a workaround without success.
I just started on a new job and I got stuck on this task because of this issue, it`s been a couple days now...
Does anyone know to solve this?
Upvotes: 0
Views: 57
Reputation: 27220
You can use a PageRenderer
.
class SomeController {
PageRenderer groovyPageRenderer
def someAction() {
def html = groovyPageRenderer.render(template: 'etiqueta', model: [user: user])
// ...
}
}
Upvotes: 1