BTW, to implement it using the acts_as_sphinx plugin, I did it the
following way:

    @application_forms = WillPaginate::Collection.create(params[:page]
|| 1, ApplicationForm.per_page) do |pager|
      result = ApplicationForm.find_with_sphinx(params[:query], :joins
=> :applicant,
                                                :sphinx => {:page =>
pager.current_page, :limit => pager.per_page} )
      # inject the result array into the paginated collection:
      pager.replace(result)
      unless pager.total_entries
        # the pager didn't manage to guess the total count, do it
manually
        pager.total_entries = result.total
      end
    end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to