似乎无法让Kaminari正确地使用嵌套资源。这是我的问题的描述。想知道是否有人能够解决这个问题。与Kaminari分页宝石嵌套资源的问题
我的路线是这样的:
resources :artists do
resources :paintings
end
在我看来,我有:
<%= paginate @paintings, :params => { :controller => 'paintings', :action => 'index' } %>
初始/基本URL看起来是这样的:
http://localhost/artists/foobar/paintings
但点击一kaminari paginate链接,呈现这样的网址:
http://localhost/paintings?artist_id=foobar&page=2
它应该是:
http://localhost/artists/foobar/paintings?page=2
你真棒,谢谢! :) – milushov 2014-02-03 09:09:44