How can I change the link format in will_paginate for page_cache in Ruby on Rails?

Posted by jaehyun on Stack Overflow See other posts from Stack Overflow or by jaehyun
Published on 2010-01-11T23:25:42Z Indexed on 2010/03/26 1:53 UTC
Read the original article Hit count: 223

I want to use page_cache with will_paginate.

There are good information on this page below.

http://railsenvy.com/2007/2/28/rails-caching-tutorial#pagination http://railslab.newrelic.com/2009/02/05/episode-5-advanced-page-caching

I wrote routes.rb looks like:

map.connect '/products/page/:page', :controller => 'products', :action => 'index'

But, links of url are not changed to '/products/page/:page' which are in will_paginate helper. They are still 'products?page=2'

How can i change url format is in will_paginate?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about will-paginate