I'm using rails and will_paginate gem. Is it possible to remove 'page' option from URL to other place - e.g. params (without ajax) ?
For example instead www.site.com/products?page=2, always show www.site.com/products
Thanks!
I'm using rails and will_paginate gem. Is it possible to remove 'page' option from URL to other place - e.g. params (without ajax) ?
For example instead www.site.com/products?page=2, always show www.site.com/products
Thanks!
不,你不能,因为你正在使用 HTTP GET 方法,所以你需要传递参数以允许控制器函数搜索对象。参数散列在 POST 方法上进行。
如果您想要一个替代解决方案,您可以查看表格和分页的数据表,这完全在 javascript 中完成,但您需要先获取所有结果。