amatsuda/kaminari — Issue #185: /page/n not working in namespace with root path
Author: davidsulc
Created: 2011-12-13 02:33:09+00:00
State: open

Hi,

Thanks a lot for this gem !

I ran into an issue that I'd gladly try to patch, if you can point me in the right direction...

If I have a namespace in `routes.rb` like this

namespace :admin do
root :to => "users#index"
resources :users do
get 'page/:page', :action => :index, :on => :collection
end
end

Kaminari doesn't generate the expected `/admin/users/page/2` URLs, but instead generates `/admin?page=2`

As I said, I'd gladly try and patch this but looking through the source I have no idea how a `root_path` could interfere with the generated URLs...