Spaghetti
Endless page for Rails > 3.1 using jQuery Sausage. Spaghetti supports both Kaminari and will_paginate.
Installation
Add this line to your application's Gemfile:
gem 'spaghetti'
And then execute:
$ bundle
Or install it yourself as:
$ gem install spaghetti
Usage
Make sure you add spaghetti JavaScript to your application.js
:
//= require spaghetti
Then add spaghetti markup to your view (example: posts/index.html):
<%= spaghetti 'posts', posts_path %>
You need to have your posts_controller
responding with the following index.js.erb
file:
<%= spaghetti 'posts', @posts %>
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request