SunspotKaminariSupport

Add methods required for Kaminari helper methods (ex: helper.paginate(result))

Installation

Add this line to your application's Gemfile:

gem 'sunspot_kaminari_support'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sunspot_kaminari_support

Usage

Gem includes module with helper method into Sunspot::Search::AbstractSearch. So now you are able to use solr results in kaminari helpers:

@result = Post.solr_search{}
paginate(@result)          # This would output several pagination links such as « First ‹ Prev ... 2 3 4 5 6 7 8 9 10 ... Next › Last »
page_entries_info(@result) # This renders a helpful message with numbers of displayed vs. total entries.

See kaminari page for detailed explanation of these helpers usage

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request