0
courses_path

This path generate a url:

http://localhost:3000/courses

With friendly urls:

resources :courses, :only => [:index] do
  get 'page/:page', :action => :index, :on => :collection
end

When I want paginate many courses, the urls output is something like:

http://localhost:3000/courses/page/2
http://localhost:3000/courses/page/3
http://localhost:3000/courses/page/4
.
.
.

For the first page the url is courses_path or courses_url

http://localhost:3000/courses

What is the link helper for each page generated by kaminari?

hyperrjas
  • 10,666
  • 25
  • 99
  • 198

1 Answers1

2

You can try following configuration:

get '/courses(/page/:page)' => 'courses#index', :as => :courses, :page => 1
siddick
  • 1,478
  • 1
  • 14
  • 15