arjangch opened a new issue, #15061: URL: https://github.com/apache/grails-core/issues/15061
### Expected Behavior In Grails-doc [Render](https://docs.grails.org/latest/ref/Controllers/render.html) page, one of example has to change a bit. This example doesn't work `render(contentType: "text/xml") { books { for (b in books) { book(title: b.title, author: b.author) } } }` But if we change **books** to **booksList** it will work `render(contentType: "text/xml") { books { for (b in booksList) { book(title: b.title, author: b.author) } } }` ### Actual Behaviour It throws exception `2025-09-09T10:38:57.342-04:00 ERROR 28986 --- [nio-8083-exec-1] o.g.web.errors.GrailsExceptionResolver : MissingMethodException occurred when processing request: [GET] /example3/student/showRenderJsonBad No signature of method: java.util.ArrayList.call() is applicable for argument types: (com.arjang.StudentController$_showRenderJsonBad_closure3$_closure10) values: [com.arjang.StudentController$_showRenderJsonBad_closure3$_closure10@37a4c94] Possible solutions: tail(), tail(), wait(), any(), last(), last(). Stacktrace follows:` ### Steps To Reproduce See my example in Github. This won't work ` def showRenderJsonBad() { def student = Student.findAll() render(contentType: "application/json") { student { for (t in student) { student (name: t.name, lastname: t.lastname) } } } }` ### Environment Information My sdkrc file java=21.0.8-zulu gradle=8.14.3 groovy=4.0.28 grails=7.0.0-RC1 ### Example Application https://github.com/arjangch/grails-project-helper/tree/main/example3 ### Version 7.0.0-RC1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
