Details
Description
I'm setting up mappings for RESTful URLs including collection resources:
"/person/$id"(controller:"person"){ action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"] } "/person"(controller:"person") { action = [GET:"list", PUT:"update", DELETE:"delete", POST:"save"] }
So the URL for viewing a collection is like
myapp/person
instead of
myapp/person/list
However, the g:paginate tag won't work with this.
It creates links with "list" in the URL when there is no action name in the URL.
I changed this line in the paginate tag of RenderTagLib
def action = (attrs.action ? attrs.action : (params.action ? params.action : "list"))
to
def action = (attrs.action ? attrs.action : (params.action ? params.action : ""))
to get it to work for me.
Commit – https://github.com/grails/grails-core/commit/c09affbb53b499a50a13f7aaf546eecd712270c6