Hello, you can try also overwrite parameter :page, like this:
Link to the first page:
link_to image_tag("/images/first_page.gif", :border => 0, :title =>
“Navigate to the first page”), {:overwrite_params => {:page => @pages.first}} if (@pages.current.number != 1)
Previous page:
link_to image_tag("/images/previous_page.gif", :border => 0, :title =>
“Navigate to the previous page”), {:overwrite_params => {:page => @pages.current.previous}} if @pages.current.previous
Pages with number:
pagination_links(@pages, {:window_size => @window_size, :always_show_anchors => false, :params => @params})
Next page:
link_to image_tag("/images/next_page.gif", :border => 0, :title =>
“Navigate to the next page”), {:overwrite_params => {:page => @pages.current.next}} if @pages.current.next
Last Page:
link_to image_tag("/images/last_page.gif", :border => 0, :title =>
“Navigate to the last page”), {:overwrite_params => {:page => @pages.last}} if (@pages.current.number != @pages.last.number)
Best Regards, Sergey.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.