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 =

In my view I have:

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

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


Rails Blog:
MySQL Blog:
Linux / Security Blog: