Forum: Ruby on Rails Pagination and routes problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5fa4bbe2cd502510e7702ae1b845f2dd?d=identicon&s=25 Maarten Hendrikx (Guest)
on 2006-04-21 08:20
Hi,

I have the following problem, my pagination links do not work.
At the bottom of my blog the links say: http://myblog/?page=2, ?page=3,
...
But they don't seem to work. When I add the name of the controller, they
do
work: http://myblog/log?page=2.

Any suggestions?

I made a new route like this:
map.connect "page/:page",
              :controller => "log",
              :action => "index"
That does work, but you have to enter the route first in the browser:
http://myblog/page/2, after that the links work great. But when I reload
the
index page, the links at the bottom again say http://myblog/?page=2.
How can change this so they also say http://myblog/page/2 on my index
page.

Any help would be great.

Maarten Hendrikx
5fa4bbe2cd502510e7702ae1b845f2dd?d=identicon&s=25 Maarten Hendrikx (Guest)
on 2006-04-21 12:05
Oh, sorry, the myblog.com link was just an example :-)
Didn't realize it was an actual link.
5fa4bbe2cd502510e7702ae1b845f2dd?d=identicon&s=25 Maarten Hendrikx (Guest)
on 2006-04-21 13:22
Problem is solved, it was an caching issue.
I had to expire the page and now all is well!
This topic is locked and can not be replied to.