Ruby on rails 将生成错误链接的gem分页吗

Ruby on rails 将生成错误链接的gem分页吗,ruby-on-rails,will-paginate,Ruby On Rails,Will Paginate,我有两个模型类别和课程 在我的课程索引页面中,我的url如下所示: http://localhost:3000/courses http://localhost:3000/courses/programming 我可以按类别查找课程,因此当时我的url更改如下: http://localhost:3000/courses http://localhost:3000/courses/programming 其中编程是一个类别。 因此,当我针对某个类别对索引页进行分页时,它会为下一个和上一个

我有两个模型类别和课程

在我的课程索引页面中,我的url如下所示:

http://localhost:3000/courses
http://localhost:3000/courses/programming
我可以按类别查找课程,因此当时我的url更改如下:

http://localhost:3000/courses
http://localhost:3000/courses/programming
其中
编程
是一个类别。 因此,当我针对某个类别对索引页进行分页时,它会为下一个和上一个url生成错误的url:

/courses/show?id=programming&page=2
我试过这个答案,但没有任何突破。
有人能帮我一下吗。

我们能看看你用来生成链接的代码吗?
=will\u paginate data,:class=>“apple\u pagination”
routes.rb content。