Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Nether is a rails engine for easily adding endless page functionality to paginated content.
Ruby CSS JavaScript
tag: v0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
lib
test
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.rdoc
Rakefile
nether.gemspec

README.rdoc

Nether

My first attempt at a rails gem, Nether is an engine for easily adding endless page functionality to content paginated by will_paginate in your rails 3.1 application.

It uses jquery.pageless and is based heavily on their demo application.

Requirements

Currently only supports apps using the assets pipeline and will_paginate.

Installation

Add the following to your Gemfile and run the bundle command.

gem 'nether'

Once the gem is installed execute the generator to install the js files and images.

rails generate nether:install

Usage

Endless page functionality is handled by a helper function that takes three arguments by default. The total number of pages undergoing pagination, 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.

render_nether("articles/article")

Help

You will find an example app at nether_example.

Todo

  • Remove dependancy on assets pipeline.

  • Compatability with other pagination solutions.

  • Test, test, test.

Something went wrong with that request. Please try again.