Issue: A controller's action has a render tag without passing in a model. There exists an action that begins with the word 'get'.
grails-app/views/site/home.gsp:
homepage
SiteController.groovy:
class SiteController {
def index() {
render (view: "home")
}
def getTest() {
render "getTest"
}
}
The site is accessed at localhost:8080/site to execute the index action of SiteController.
Expected output: homepage Actual output: getTest homepage
If the render action of index is changed to this:
render(view: "home", model: [:])
The expected output is produced.
If a character is added before the word get in the action name, the expected output is produced.
Interestingly enough, getTest() is color coded as purple in IDEA. It should also be noted that if you have multiple methods with the word get at the beginning, they are ALL executed.
This did NOT happen in Grails 1.3.6. This is reproducible in a brand new Grails 2.2.2 project and seems like a bug to me. Why is this happening?