Has anyone ever tried paginating a thinking sphinx result set thru ajax?
I have this is in my controller action:
@results = Model.search params[:query], :page => params[:page] || 1, :per_page => 1
and in my application.js:
$(".pagination a").live("click", function() {
$.get(this.href, null, null, "script");
return false;
});
Now, I have tried this and this works for normal active record pagination like so:
@results = Model.paginate(:page => params[:page] || 1, :per_page => 1)
But if I use thinking-sphinx for getting the records the ajax pagination fails. Am I missing something?