class SearchController {
def list = {
List<Product> productsList = productRepository.findProductBySearchPhrase(params.searchPhrase)
render(view: "/product/list", model: [products: productsList])
}
}
class UrlMappings {
"/$controller/$action?/$id?" {
constraints {}
}
"/search" {
controller = "search"
view = "list"
constraints {}
}
}
1) Этот URL работает правильно, отображая GSP из каталога / views / product / list.
myapp.com / search / list? SearchPhrase = underware
2) ЭтоURL не работает, рендеринг /views/search/list.
myapp.com / search? SearchPhrase = underware
Есть идеи?