GRAILS-10509 - fix compilation problem with abstract methods in controllers
refactor some logic into a helper method
Merge branch '2.3.x'