Nether is a rails engine for easily adding endless page functionality to paginated content. It uses jquery.pageless and is based heavily on their demo application.
Currently only supports apps using the assets pipeline.
Add the following to your Gemfile and run the bundle command.
Once the gem is installed execute the generator to install the js files and images.
rails generate nether:install
Endless page functionality is handled by a helper function that takes three arguments by default. The number of pages, the path to get more content and the css id of the dom object to render. There is also an optional fourth argument for specifying the dom object containing the content to be rendered.
To use the helper add the following to your view after the will paginate helper, replacing variables as necessary.
<%= nether(@articles.total_pages, articles_path, "#content") %>
You must also add a helper to the action handling the pagination. The helper takes the partial to render as an argument and an optional argument to delay rendering.
Usage is the same as for will_paginate, however the method num_pages is instead used to return the number of pages.
<%= nether(@articles.num_pages, articles_path, "#content") %>