I'm using Grails 2.4.2 with the RestfulController and this particular controller uses PagingRestfulController.
I'm trying to run the action searchProducts in the Product Controller when I do a GET on "/product/search" but instead it's running queryForResource.
Grails created listAllResources and queryForResource with the "/product"(resources:'product') URL mapping. Below is my URL Mapping and the applicable parts of the Product Controller. How can I call the search action?
URL Mapping
"/product"(resources:'product')
"/product/search"(controller: 'product'){
action = [GET: 'searchProducts']
}
Product Controller
protected List<Product> searchProducts(Map params) {
log.debug("searching products...");
}
protected List<Product> listAllResources(Map params) {
log.debug("listing all resources...");
}
protected List<Product> queryForResource(Serializable id) {
log.debug("querying for resources...");
}