pat / thinking-sphinx

Sphinx/Manticore plugin for ActiveRecord/Rails
http://freelancing-gods.com/thinking-sphinx
MIT License
1.63k stars 468 forks source link

Pagination -> Kaminari #192

Closed tscolari closed 13 years ago

tscolari commented 13 years ago

Could you please make it compatible with Kaminari pagination?

will_paginate is way outdated, and doesn't play nice with rails3 cache

zipme commented 13 years ago

+1

marciomr commented 13 years ago

+1

pat commented 13 years ago

Latest commit takes care of this. Not exactly sure when I'll get the next gem releases (1.4.x and 2.0.x) out, but it will be soonish. In the meantime, use the git repo as your source :)

pat commented 13 years ago

Oh, and this is mainly focused on the paginate method working with search results. You can also use the page and per methods, but keep in mind you must be working with a search object first (don't call them on the class - that's only for ActiveRecord pagination):

Article.search('foo').page(params[:page]).per(10)
marciomr commented 13 years ago

Thanks,

that was amazingly fast. I will try it out.

Mrcio

On Tue, Mar 22, 2011 at 8:38 PM, freelancing-god < reply@reply.github.com>wrote:

Oh, and this is mainly focused on the paginate method working with search results. You can also use the page and per methods, but keep in mind you must be working with a search object first (don't call them on the class

  • that's only for ActiveRecord pagination):

    Article.search('foo').page(params[:page]).per(10)

Reply to this email directly or view it on GitHub:

https://github.com/freelancing-god/thinking-sphinx/issues/192#comment_905508

pat commented 13 years ago

Well, you were lucky enough to request this half an hour ago - others have been waiting a little longer ;)

shir commented 13 years ago

Looks like there is no methods next_page?, first_page?. Colud you add this? They are needed for custom pagination.

pat commented 13 years ago

Those methods are now added.

shir commented 13 years ago

Thank you much!