I would like to implement the following:
import org.springframework.web.servlet.support.RequestContextUtils as RCU
class HomeController {
def home = {
def locale = RCU.getLocale(request)
render view: viewExists("home_$locale") ? "home_$locale": "home"
}
}
What is the code of boolean viewExists(String viewPath)
that returns true if the input argument points to a valid GSP or Template file?