forget it, it works ... ;-)
Arnaud Garcia a ?crit :
> Hi list,
>
> I Try to do a custom paginator, but the offset never increase ??
>
> def
> showFriends
>
> @friends_pages = Paginator.new self, allFriends.size, 3,
> @params[''page'']
> limit= @friends_pages.items_per_page
> offset= @friends_pages.current.offset
> logger.info("limit=#{limit}, offset=#{offset}")
> <==== ALWAYS 0 since params[''page''] =2 for
> @friends_list=allFriends.slice(offset,offset+limit)
> end
>
> I thought that the paginator object compute the offset using the size
> of the list, the limit and the page number ? I certainly miss
> somenthing ;-)
>
> thanks
> arnaud
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>