Topic: paginator: redirect back to the last page

Hi,

  I use paginator and want to redirect back to the last page not page 1, which is the default behavior. I guess I should remember the last page using a session object. Unfortunately this seems not to be easy. I need to remember the last action and the pagenumber of the paginator and to check if the last action uses paginator.
How can I do this clean and dry and smart ?

Last edited by lisan (2006-12-17 16:58:39)

Re: paginator: redirect back to the last page

http://agilewebdevelopment.com/plugins/history

try this plugin, it tracts history of browsing (be warned - browser back buttons will mess up some redirection if you use them) ..

Re: paginator: redirect back to the last page

or you can just sent the user to the previous page they visited via:

redirect_to :back

Re: paginator: redirect back to the last page

redirect_to :back

does not work as I need it.
It redirects to the FIRST page of the paginator object also.

I want to redirect to the page 4 of the last action if page 4 was the last one visited.

Last edited by lisan (2006-12-22 07:44:56)