This gem is just a simple integration of will_paginate and neo4j.
- Add
neo4j-will_paginate
to yourGemfile
. require 'neo4j-will_paginate'
somewhere from your code.
Please see the will_paginate and neo4j.rb for details.
But here is simple example:
# Probably in the Rails controller:
def index
@people = Person.all.paginate(:page => 2, :per_page => 20) # :per_page is optional
end
# Then in the view:
paginate @people
MIT by Dmytrii Nagirniak and Andreas Ronge