Endless pagination com o kaminari facinho! #ruby #rails

This tutorial is designed to get you up and running with a basic Rails application with endless scrolling for blog posts. We will use Kaminari for pagination, and Infinite Scroll for the JavaScript functionality. You can find the full source code for this demonstration at github.com/zzak/endless-kaminari-demo . Please note that we will also be using Rails 4, in case that makes a difference It may affect how your controller looks when it is generated. Tutorial Start by creating a new rails application. $ rails new endless_kaminari Don't forget to change into your new application's directory before continuing with this tutorial. $ cd endless_kaminari Dependencies Add 'kaminari' to your Gemfile and run the bundle command. $ echo "gem 'kaminari'" >> Gemfile $ bundle Run the jQuery generator to download the necessary files and setup your Rails app to use jQuery. $ rails generat...