Pagination Question [Tagging: find_tagged_with]

Hello experts,

I am trying to paginate the following query but no matter what I try I
am unable to paginate it.

In controller I have:

  q_webpages=Webpage.find_tagged_with(:any =>  params[:tag], 

:separator=>‘,’, :order=>‘updated_at DESC’)
@webpage_pages, @webpages =
paginate_collection(:collection=>q_webpages)

In my view I have:

<%= link_to ‘Previous page’, { :page =>
@webpage_pages.current.previous } if @webpage_pages.current.previous %>
<%= link_to ‘Next page’, { :page => @webpage_pages.current.next } if
@webpage_pages.current.next %>

The problem is that I do see the Next page link, but when I go to the
next page, it shows the same records as on the first page.

Can anyone please assist me in this?

Is there an alternate way to paginate a custom collection such as the
one retrieved using find_tagged_with

I have spent the entire night trying to resolve this.

Please help
Thanks in advance

Frank

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com