No commit activity in last 3 years
No release in over 3 years
Integration between Neo4jrb 3.0 and will_paginate.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Integration for Neo4j.rb and will_paginate

This gem is just a simple integration of will_paginate and neo4j. It was formerly known as neo4j-will_paginate but is being maintained here.

Which version do I use?

If you're using Neo4jrb 3, use this; otherwise, use the legacy version linked above.

Installation

  1. Add neo4j-will_paginate_redux to your Gemfile.
  2. require 'neo4j-will_paginate_redux' somewhere from your code.

Using

Please see the will_paginate and neo4j.rb for details.

But here is a simple example:

# Probably in the Rails controller:

def index
  # :per_page is optional
  # :return is also optional. To return multiple objects, use an array of symbols
  # :order is -- you guessed it -- optional, too. It accepts the same arguments as Neo4j::ActiveNode::QueryProxy's `order` method
  @people = Person.as(:p).where(age: 30).paginate(:page => 2, :per_page => 20, return: :p, order: :name) 
end

# Then in the view:
will_paginate @people

License

MIT by Dmytrii Nagirniak, Andreas Ronge, and Chris Grigg