will_paginate 重定向到根路径

4
我有一个Rails 3应用程序(附带Spree 0.40)。
在我的ProductsController中,index操作下面有产品列表和will_paginate助手。
问题是该助手呈现到localhost:3000/?page=x而不是localhost:3000/products/?page=x。
我在路由文件中有resources:products
你知道是什么原因导致这种奇怪的行为吗?
谢谢。
1个回答

1

我不得不从Spree gem的routes.rb中删除root :to来解决这个问题。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接